Skip to content

Commit 55e555e

Browse files
committed
adding documentation in docstring for segmaths, segstats, seglabfusion
1 parent b9610cb commit 55e555e

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

nipype/interfaces/niftyseg/label_fusion.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,23 @@ class LabelFusion(NiftySegCommand):
114114
"""Interface for executable seg_LabelFusion from NiftySeg platform using
115115
type STEPS as classifier Fusion.
116116
117+
This executable implements 4 fusion strategies (-STEPS, -STAPLE, -MV or
118+
- SBA), all of them using either a global (-GNCC), ROI-based (-ROINCC),
119+
local (-LNCC) or no image similarity (-ALL). Combinations of fusion
120+
algorithms and similarity metrics give rise to different variants of known
121+
algorithms. As an example, using LNCC and MV as options will run a locally
122+
weighted voting strategy with LNCC derived weights, while using STAPLE and
123+
LNCC is equivalent to running STEPS as per its original formulation.
124+
A few other options pertaining the use of an MRF (-MRF beta), the initial
125+
sensitivity and specificity estimates and the use of only non-consensus
126+
voxels (-unc) for the STAPLE and STEPS algorithm. All processing can be
127+
masked (-mask), greatly reducing memory consumption.
128+
129+
As an example, the command to use STEPS should be:
130+
seg_LabFusion -in 4D_Propragated_Labels_to_fuse.nii -out \
131+
FusedSegmentation.nii -STEPS 2 15 TargetImage.nii \
132+
4D_Propagated_Intensities.nii
133+
117134
For source code, see http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg
118135
For Documentation, see:
119136
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation

nipype/interfaces/niftyseg/maths.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,19 @@ class MathsOutput(TraitedSpec):
5454
class MathsCommand(NiftySegCommand):
5555
"""
5656
Base Command Interface for seg_maths interfaces.
57+
58+
The executable seg_maths enables the sequential execution of arithmetic
59+
operations, like multiplication (-mul), division (-div) or addition
60+
(-add), binarisation (-bin) or thresholding (-thr) operations and
61+
convolution by a Gaussian kernel (-smo). It also alows mathematical
62+
morphology based operations like dilation (-dil), erosion (-ero),
63+
connected components (-lconcomp) and hole filling (-fill), Euclidean
64+
(- euc) and geodesic (-geo) distance transforms, local image similarity
65+
metric calculation (-lncc and -lssd). Finally, it allows multiple
66+
operations over the dimensionality of the image, from merging 3D images
67+
together as a 4D image (-merge) or splitting (-split or -tp) 4D images
68+
into several 3D images, to estimating the maximum, minimum and average
69+
over all time-points, etc.
5770
"""
5871
_cmd = get_custom_path('seg_maths')
5972
input_spec = MathsInput

nipype/interfaces/niftyseg/stats.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ class StatsOutput(TraitedSpec):
4848
class StatsCommand(NiftySegCommand):
4949
"""
5050
Base Command Interface for seg_stats interfaces.
51+
52+
The executable seg_stats enables the estimation of image statistics on
53+
continuous voxel intensities (average, standard deviation, min/max, robust
54+
range, percentiles, sum, probabilistic volume, entropy, etc) either over
55+
the full image or on a per slice basis (slice axis can be specified),
56+
statistics over voxel coordinates (location of max, min and centre of
57+
mass, bounding box, etc) and statistics over categorical images (e.g. per
58+
region volume, count, average, Dice scores, etc). These statistics are
59+
robust to the presence of NaNs, and can be constrained by a mask and/or
60+
thresholded at a certain level.
5161
"""
5262
_cmd = get_custom_path('seg_stats')
5363
input_spec = StatsInput

0 commit comments

Comments
 (0)