Skip to content

Commit 22116d7

Browse files
committed
code cleanup
1 parent 4b0d86b commit 22116d7

3 files changed

Lines changed: 29 additions & 25 deletions

File tree

‎src/main/java/inra/ijpb/measure/region2d/RegionBoundaries.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ public final static Map<Integer, ArrayList<Point2D>> runLengthsCornersMap(ImageP
243243
* <li><i>(x+0.5, y+1)</i>: bottom boundary</li>
244244
* </ul>
245245
*
246+
* Method used for computation of convexity.
247+
*
246248
* @param binaryImage
247249
* the image processor containing the binary region
248250
* @return an array of Point2D, located on the boundary of the region.
@@ -303,6 +305,8 @@ public static final ArrayList<Point2D> boundaryPixelsMiddleEdges(ImageProcessor
303305
* <li><i>(x+0.5, y+1)</i>: bottom boundary</li>
304306
* </ul>
305307
*
308+
* Method used for computation of convexity.
309+
*
306310
* @param labelImage
307311
* the image processor containing the region labels
308312
* @param labels

‎src/main/java/inra/ijpb/measure/region3d/GeodesicDiameter3D.java‎

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ public class GeodesicDiameter3D extends RegionAnalyzer3D<GeodesicDiameter3D.Resu
7171
*/
7272
ChamferMask3D chamferMask;
7373

74-
/**
75-
* The string used for indicating the current step in algo events.
76-
*/
77-
String currentStep = "";
78-
7974

8075
// ==================================================
8176
// Constructors
@@ -198,10 +193,10 @@ public Result[] analyzeRegions(ImageStack labelImage, int[] labels,
198193

199194
this.fireStatusChanged(this, "Computing first geodesic extremities...");
200195

201-
// Second distance propagation from first maximum
196+
// Distance propagation from initial markers
202197
distanceMap = gdt.geodesicDistanceMap(marker, labelImage);
203198

204-
// find position of maximal value for each label
199+
// find position of maximum value for each label
205200
// this is expected to correspond to a geodesic extremity
206201
Cursor3D[] firstGeodesicExtremities = LabelValues.findPositionOfMaxValues(distanceMap, labelImage, labels);
207202

@@ -250,25 +245,15 @@ public Result[] analyzeRegions(ImageStack labelImage, int[] labels,
250245
result[i] = res;
251246
}
252247

253-
// // calibrate the results
254-
// if (calib.scaled())
255-
// {
256-
// this.fireStatusChanged(this, "Re-calibrating results");
257-
// for (int i = 0; i < nLabels; i++)
258-
// {
259-
// result[i] = result[i].recalibrate(calib);
260-
// }
261-
// }
262-
263248
// returns the results
264249
return result;
265250
}
266251

267252

268-
// ==================================================
269-
// Implementation of AlgoListener interface
253+
// ==================================================
254+
// Implementation of AlgoListener interface
270255

271-
@Override
256+
@Override
272257
public void algoProgressChanged(AlgoEvent evt)
273258
{
274259
fireProgressChanged(new Event(this, evt));
@@ -289,10 +274,6 @@ class Event extends AlgoEvent
289274
public Event(GeodesicDiameter3D source, AlgoEvent evt)
290275
{
291276
super(source, "(GeodDiam3d) " + evt.getStatus(), evt.getCurrentProgress(), evt.getTotalProgress());
292-
if (!currentStep.isEmpty())
293-
{
294-
this.status = "(GeodDiam3d-" + currentStep + ") " + evt.getStatus();
295-
}
296277
}
297278
}
298279

‎src/main/java/inra/ijpb/plugins/AnalyzeRegions.java‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,40 +274,58 @@ public ResultsTable process(ImagePlus imagePlus)
274274
public static final class Features
275275
{
276276
/** The boolean flag for computing pixel count.*/
277-
public boolean pixelCount = false;
277+
@Deprecated
278+
public boolean pixelCount = false;
278279
/** The boolean flag for computing area.*/
280+
@Deprecated
279281
public boolean area = true;
280282
/** The boolean flag for computing perimeter.*/
283+
@Deprecated
281284
public boolean perimeter = true;
282285
/** The boolean flag for computing circularity.*/
286+
@Deprecated
283287
public boolean circularity = true;
284288
/** The boolean flag for computing Euler number.*/
289+
@Deprecated
285290
public boolean eulerNumber = true;
286291
/** The boolean flag for computing bounding box.*/
292+
@Deprecated
287293
public boolean boundingBox = true;
288294
/** The boolean flag for computing centroid.*/
295+
@Deprecated
289296
public boolean centroid = true;
290297
/** The boolean flag for computing equivalent ellipse.*/
298+
@Deprecated
291299
public boolean equivalentEllipse = true;
292300
/** The boolean flag for computing ellipse elongation.*/
301+
@Deprecated
293302
public boolean ellipseElongation = true;
294303
/** The boolean flag for computing convexity.*/
304+
@Deprecated
295305
public boolean convexity = true;
296306
/** The boolean flag for computing maximum Feret diameter.*/
307+
@Deprecated
297308
public boolean maxFeretDiameter = true;
298309
/** The boolean flag for computing oriented box.*/
310+
@Deprecated
299311
public boolean orientedBox = true;
300312
/** The boolean flag for computing elongation of oriented box.*/
313+
@Deprecated
301314
public boolean orientedBoxElongation = true;
302315
/** The boolean flag for computing geodesic diameter.*/
316+
@Deprecated
303317
public boolean geodesicDiameter = true;
304318
/** The boolean flag for computing tortuosity.*/
319+
@Deprecated
305320
public boolean tortuosity = true;
306321
/** The boolean flag for computing largest inscribed disc.*/
322+
@Deprecated
307323
public boolean maxInscribedDisc = true;
308324
/** The boolean flag for computing average thickness.*/
325+
@Deprecated
309326
public boolean averageThickness = true;
310327
/** The boolean flag for computing geodesic elongation.*/
328+
@Deprecated
311329
public boolean geodesicElongation = true;
312330

313331
/**
@@ -316,6 +334,7 @@ public static final class Features
316334
* @param state
317335
* the state to set.
318336
*/
337+
@Deprecated
319338
public void setAll(boolean state)
320339
{
321340
this.pixelCount = state;

0 commit comments

Comments
 (0)