5454public enum ChamferWeights3D
5555{
5656 /** Use weight equal to 1 for all neighbors */
57+ @ Deprecated
5758 CHESSBOARD ("Chessboard (1,1,1)" , new short [] { 1 , 1 , 1 }),
5859 /**
5960 * Use weights 1 for orthogonal neighbors and 2 for diagonal neighbors,
6061 * and 3 for cube-diagonals.
6162 */
63+ @ Deprecated
6264 CITY_BLOCK ("City-Block (1,2,3)" , new short [] { 1 , 2 , 3 }),
6365 /**
6466 * Use weights 1 for orthogonal neighbors and sqrt(2) for diagonal
6567 * neighbors, and sqrt(3) for cube-diagonals.
6668 * Use 10, 14 and 17 for short version.
6769 */
70+ @ Deprecated
6871 QUASI_EUCLIDEAN ("Quasi-Euclidean (1,1.41,1.73)" ,
6972 new short [] { 10 , 14 , 17 },
7073 new float [] { 1 , (float ) Math .sqrt (2 ), (float ) Math .sqrt (3 ) }),
7174 /**
7275 * Use weights 3 for orthogonal neighbors and 4 for diagonal neighbors,
7376 * and 5 for cube-diagonals (best approximation for 3-by-3-by-3 masks).
7477 */
78+ @ Deprecated
7579 BORGEFORS ("Borgefors (3,4,5)" , new short [] { 3 , 4 , 5 }),
7680
7781 /**
7882 * Use weights 3 for orthogonal neighbors and 4 for diagonal neighbors, and
7983 * 5 for cube-diagonals, and 7 for (2,1,1) shifts. Good approximation using
8084 * only four weights, and keeping low value of orthogonal weight.
8185 */
86+ @ Deprecated
8287 WEIGHTS_3_4_5_7 ("Svensson <3,4,5,7>" , new short [] { 3 , 4 , 5 , 7 });
8388
8489 private final String label ;
@@ -105,6 +110,7 @@ private ChamferWeights3D(String label, short[] shortWeights,
105110 /**
106111 * @return the weights as shorts
107112 */
113+ @ Deprecated
108114 public short [] getShortWeights ()
109115 {
110116 return this .shortWeights ;
@@ -113,6 +119,7 @@ public short[] getShortWeights()
113119 /**
114120 * @return the weights as floats
115121 */
122+ @ Deprecated
116123 public float [] getFloatWeights ()
117124 {
118125 return this .floatWeights ;
@@ -121,6 +128,7 @@ public float[] getFloatWeights()
121128 /**
122129 * @return the label associated to this chamfer weight
123130 */
131+ @ Deprecated
124132 public String toString ()
125133 {
126134 return this .label ;
@@ -129,6 +137,7 @@ public String toString()
129137 /**
130138 * @return all the chamfer weights labels
131139 */
140+ @ Deprecated
132141 public static String [] getAllLabels ()
133142 {
134143 int n = ChamferWeights3D .values ().length ;
@@ -150,6 +159,7 @@ public static String[] getAllLabels()
150159 * @throws IllegalArgumentException
151160 * if label name is not recognized.
152161 */
162+ @ Deprecated
153163 public static ChamferWeights3D fromLabel (String label )
154164 {
155165 if (label != null )
@@ -191,6 +201,7 @@ public static ChamferWeights3D fromLabel(String label)
191201 * @return a collection of offset encapsulating the shift in x, y and z
192202 * directions, and the associated weight.
193203 */
204+ @ Deprecated
194205 public static Collection <ShortOffset > getForwardOffsets (short [] weights )
195206 {
196207 int nWeights = weights .length ;
@@ -268,6 +279,7 @@ public static Collection<ShortOffset> getForwardOffsets(short[] weights)
268279 * @return a collection of offset encapsulating the shift in x, y and z
269280 * directions, and the associated weight.
270281 */
282+ @ Deprecated
271283 public static Collection <FloatOffset > getForwardOffsets (float [] weights )
272284 {
273285 int nWeights = weights .length ;
@@ -345,6 +357,7 @@ public static Collection<FloatOffset> getForwardOffsets(float[] weights)
345357 * @return a collection of offset encapsulating the shift in x, y and z
346358 * directions, and the associated weight.
347359 */
360+ @ Deprecated
348361 public static Collection <ShortOffset > getBackwardOffsets (short [] weights )
349362 {
350363 int nWeights = weights .length ;
@@ -422,6 +435,7 @@ public static Collection<ShortOffset> getBackwardOffsets(short[] weights)
422435 * @return a collection of offset encapsulating the shift in x, y and z
423436 * directions, and the associated weight.
424437 */
438+ @ Deprecated
425439 public static Collection <FloatOffset > getBackwardOffsets (float [] weights )
426440 {
427441 int nWeights = weights .length ;
@@ -481,12 +495,16 @@ public static Collection<FloatOffset> getBackwardOffsets(float[] weights)
481495 public static class ShortOffset
482496 {
483497 /** the offset along the X-axis */
498+ @ Deprecated
484499 public final int dx ;
485500 /** the offset along the Y-axis */
501+ @ Deprecated
486502 public final int dy ;
487503 /** the offset along the Z-axis */
504+ @ Deprecated
488505 public final int dz ;
489506 /** the weight associated to this offset */
507+ @ Deprecated
490508 public final short weight ;
491509
492510 /**
@@ -501,6 +519,7 @@ public static class ShortOffset
501519 * @param weight
502520 * the weight associated to this offset
503521 */
522+ @ Deprecated
504523 public ShortOffset (int dx , int dy , int dz , short weight )
505524 {
506525 this .dx = dx ;
@@ -517,12 +536,16 @@ public ShortOffset(int dx, int dy, int dz, short weight)
517536 public static class FloatOffset
518537 {
519538 /** the offset along the X-axis */
539+ @ Deprecated
520540 public final int dx ;
521541 /** the offset along the Y-axis */
542+ @ Deprecated
522543 public final int dy ;
523544 /** the offset along the Z-axis */
545+ @ Deprecated
524546 public final int dz ;
525547 /** the weight associated to this offset */
548+ @ Deprecated
526549 public final float weight ;
527550
528551 /**
@@ -537,6 +560,7 @@ public static class FloatOffset
537560 * @param weight
538561 * the weight associated to this offset
539562 */
563+ @ Deprecated
540564 public FloatOffset (int dx , int dy , int dz , float weight )
541565 {
542566 this .dx = dx ;
0 commit comments