Skip to content

Commit 9c40923

Browse files
authored
updated readme (2D whole slide group explained) (PolusAI#294)
1 parent cb077da commit 9c40923

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,17 +185,19 @@ Example -- whole-slide featurization with 4 threads:
185185
```
186186
dir = "/2d_dataset/intensity"
187187
import nyxus
188-
nyx = nyxus.Nyxus (features=["*ALL*"], n_feature_calc_threads=4)
188+
nyx = nyxus.Nyxus (features=["*WHOLESLIDE*"], n_feature_calc_threads=4)
189189
f = nyx.featurize_directory (intensity_dir=dir, label_dir=dir)
190190
```
191191

192-
Example -- whole-volume featurization of a NIFTI dataset with 4 threads:
192+
Note: feature group `*WHOLESLIDE*` but not `*ALL*` is used to avoid calculation of shape features meaningless in case of the trivial rectangular shape of unsegmented slides. particularly, group `*WHOLESLIDE*` disables the time-consuming group GLDZM, basic morphology features (AREA_PIXELS_COUNT, AREA_UM2, ASPECT_RATIO, BBOX_XMIN, BBOX_YMIN, BBOX_WIDTH, BBOX_HEIGHT, CENTROID_X, CENTROID_Y, COMPACTNESS, DIAMETER_EQUAL_AREA, EXTENT, MASS_DISPLACEMENT, WEIGHTED_CENTROID_X, WEIGHTED_CENTROID_Y), enclosing/inscribing/circumscribing circle features, convex hull based features (CONVEX_HULL_AREA, SOLIDITY, CIRCULARITY, POLYGONALITY_AVE, HEXAGONALITY_AVE, HEXAGONALITY_STDDEV), fractal dimension features, geodetic features, ROI neighbor features, ROI radius features, ellipse fitting features, extrema features, morphological erosion features, Caliper and chords features.
193+
194+
Disabled features can be requested by explicitly specifying them, for example enforcing calculation of the grey level distance zone matrix based (GLDZM) features:
193195

194196
```
195-
dir = "/3d_dataset"
197+
dir = "/2d_dataset/intensity"
196198
import nyxus
197-
nyx = nyxus.Nyxus3D (features=["*3D_ALL*"], n_feature_calc_threads=4)
198-
f = nyx.featurize_directory (intensity_dir=dir, label_dir=dir, file_pattern=".*\\.nii\\.gz")
199+
nyx = nyxus.Nyxus (features=["*WHOLESLIDE*", "*ALL_GLDZM*"], n_feature_calc_threads=4)
200+
f = nyx.featurize_directory (intensity_dir=dir, label_dir=dir)
199201
```
200202

201203

@@ -413,7 +415,7 @@ Apart from defining your feature set by explicitly specifying comma-separated fe
413415
| \*all_glszm\* | glszm_sae, glszm_lae, glszm_gln, glszm_glnn, glszm_szn, glszm_sznn, glszm_zp, glszm_glv, glszm_zv, glszm_ze, glszm_lglze, glszm_hglze, glszm_salgle, glszm_sahgle, glszm_lalgle, glszm_lahgle
414416
| \*all_gldm\* | gldm_sde, gldm_lde, gldm_gln, gldm_dn, gldm_dnn, gldm_glv, gldm_dv, gldm_de, gldm_lgle, gldm_hgle, gldm_sdlgle, gldm_sdhgle, gldm_ldlgle, gldm_ldhgle
415417
| \*all_ngtdm\* | ngtdm_coarseness, ngtdm_contrast, ngtdm_busyness, ngtdm_complexity, ngtdm_strength
416-
| \*wholeslide\* | All the features except those irrelevant for the whole-slide use case (BasicMorphology, EnclosingInscribingCircumscribingCircle, ConvexHull, FractalDimension, GeodeticLengthThickness, Neighbor, RoiRadius, EllipseFitting, EulerNumber, Extrema, ErosionPixel, CaliperFeret, CaliperMartin, CaliperNassenstein, and Chords)
418+
| \*wholeslide\* | Only features relevant to the whole-slides whose single ROIs match the images themselves, except shape features meaningless in the whole-slide use case and certain time-consuming texture features (GLDZM features).
417419
| \*all\* | All the features
418420

419421
## Command line usage

0 commit comments

Comments
 (0)