Skip to content

Commit 29057c8

Browse files
committed
Update brainsuite.py
Added description and doctests
1 parent 8884254 commit 29057c8

File tree

1 file changed

+219
-0
lines changed

1 file changed

+219
-0
lines changed

nipype/interfaces/brainsuite.py

Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,23 @@ class BseOutputSpec(TraitedSpec):
6363

6464

6565
class Bse(CommandLine):
66+
"""
67+
brain surface extractor (BSE)
68+
This program performs automated skull and scalp removal on T1-weighted MRI volumes.
69+
70+
http://brainsuite.org/processing/surfaceextraction/bse/
71+
72+
Examples
73+
--------
74+
75+
>>> from nipype.interfaces import brainsuite
76+
>>> from nipype.testing import example_data
77+
>>> bse = brainsuite.Bse()
78+
>>> bse.inputs.inputMRIFile = example_data('structural.nii')
79+
>>> results = bse.run() #doctest: +SKIP
80+
81+
"""
82+
6683
input_spec = BseInputSpec
6784
output_spec = BseOutputSpec
6885
_cmd = 'bse'
@@ -156,6 +173,25 @@ class BfcOutputSpec(TraitedSpec):
156173

157174

158175
class Bfc(CommandLine):
176+
"""
177+
bias field corrector (BFC)
178+
This program corrects gain variation in T1-weighted MRI.
179+
180+
http://brainsuite.org/processing/surfaceextraction/bfc/
181+
182+
Examples
183+
--------
184+
185+
>>> from nipype.interfaces import brainsuite
186+
>>> from nipype.testing import example_data
187+
>>> bfc = brainsuite.Bfc()
188+
>>> bfc.inputs.inputMRIFile = example_data('structural.nii')
189+
>>> bfc.inputs.inputMaskFile = example_data('mask.nii')
190+
>>> results = bfc.run() #doctest: +SKIP
191+
192+
"""
193+
194+
159195
input_spec = BfcInputSpec
160196
output_spec = BfcOutputSpec
161197
_cmd = 'bfc'
@@ -202,6 +238,25 @@ class PvcOutputSpec(TraitedSpec):
202238

203239

204240
class Pvc(CommandLine):
241+
"""
242+
partial volume classifier (PVC) tool.
243+
This program performs voxel-wise tissue classification T1-weighted MRI.
244+
Image should be skull-stripped and bias-corrected before tissue classification.
245+
246+
http://brainsuite.org/processing/surfaceextraction/pvc/
247+
248+
Examples
249+
--------
250+
251+
>>> from nipype.interfaces import brainsuite
252+
>>> from nipype.testing import example_data
253+
>>> pvc = brainsuite.Pvc()
254+
>>> pvc.inputs.inputMRIFile = example_data('structural.nii')
255+
>>> pvc.inputs.inputMaskFile = example_data('mask.nii')
256+
>>> results = pvc.run() #doctest: +SKIP
257+
258+
"""
259+
205260
input_spec = PvcInputSpec
206261
output_spec = PvcOutputSpec
207262
_cmd = 'pvc'
@@ -262,6 +317,28 @@ class CerebroOutputSpec(TraitedSpec):
262317

263318

264319
class Cerebro(CommandLine):
320+
"""
321+
Cerebrum/cerebellum labeling tool
322+
This program performs automated labeling of cerebellum and cerebrum in T1 MRI.
323+
Input MRI should be skull-stripped or a brain-only mask should be provided.
324+
325+
326+
http://brainsuite.org/processing/surfaceextraction/cerebrum/
327+
328+
Examples
329+
--------
330+
331+
>>> from nipype.interfaces import brainsuite
332+
>>> from nipype.testing import example_data
333+
>>> cerebro = brainsuite.Cerebro()
334+
>>> cerebro.inputs.inputMRIFile = example_data('structural.nii')
335+
>>> cerebro.inputs.inputAtlasMRIFile = 'atlasMRIVolume.img'
336+
>>> cerebro.inputs.inputAtlasLabelFile = 'atlasLabels.img'
337+
>>> cerebro.inputs.inputBrainMaskFile = example_data('mask.nii')
338+
>>> results = cerebro.run() #doctest: +SKIP
339+
340+
"""
341+
265342
input_spec = CerebroInputSpec
266343
output_spec = CerebroOutputSpec
267344
_cmd = 'cerebro'
@@ -304,6 +381,25 @@ class CortexOutputSpec(TraitedSpec):
304381

305382

306383
class Cortex(CommandLine):
384+
"""
385+
cortex extractor
386+
This program produces a cortical mask using tissue fraction estimates
387+
and a co-registered cerebellum/hemisphere mask.
388+
389+
http://brainsuite.org/processing/surfaceextraction/cortex/
390+
391+
Examples
392+
--------
393+
394+
>>> from nipype.interfaces import brainsuite
395+
>>> from nipype.testing import example_data
396+
>>> cortex = brainsuite.Cortex()
397+
>>> cortex.inputs.inputHemisphereLabelFile = example_data('mask.nii')
398+
>>> cortex.inputs.inputTissueFractionFile = example_data('tissues.nii.gz')
399+
>>> results = cortex.run() #doctest: +SKIP
400+
401+
"""
402+
307403
input_spec = CortexInputSpec
308404
output_spec = CortexOutputSpec
309405
_cmd = 'cortex'
@@ -340,6 +436,23 @@ class ScrubmaskOutputSpec(TraitedSpec):
340436

341437

342438
class Scrubmask(CommandLine):
439+
"""
440+
ScrubMask tool
441+
scrubmask filters binary masks to trim loosely connected voxels that may
442+
result from segmentation errors and produce bumps on tessellated surfaces.
443+
444+
http://brainsuite.org/processing/surfaceextraction/scrubmask/
445+
446+
Examples
447+
--------
448+
449+
>>> from nipype.interfaces import brainsuite
450+
>>> from nipype.testing import example_data
451+
>>> scrubmask = brainsuite.Scrubmask()
452+
>>> scrubmask.inputs.inputMaskFile = example_data('mask.nii')
453+
>>> results = scrubmask.run() #doctest: +SKIP
454+
455+
"""
343456
input_spec = ScrubmaskInputSpec
344457
output_spec = ScrubmaskOutputSpec
345458
_cmd = 'scrubmask'
@@ -379,6 +492,21 @@ class TcaOutputSpec(TraitedSpec):
379492

380493

381494
class Tca(CommandLine):
495+
"""
496+
topological correction algorithm (TCA)
497+
This program removes topological handles from a binary object.
498+
499+
http://brainsuite.org/processing/surfaceextraction/tca/
500+
501+
Examples
502+
--------
503+
>>> from nipype.interfaces import brainsuite
504+
>>> from nipype.testing import example_data
505+
>>> tca = brainsuite.Tca()
506+
>>> tca.inputs.inputMaskFile = example_data('mask.nii')
507+
>>> results = tca.run() #doctest: +SKIP
508+
509+
"""
382510
input_spec = TcaInputSpec
383511
output_spec = TcaOutputSpec
384512
_cmd = 'tca'
@@ -413,6 +541,28 @@ class DewispOutputSpec(TraitedSpec):
413541

414542

415543
class Dewisp(CommandLine):
544+
"""
545+
dewisp
546+
removes wispy tendril structures from cortex model binary masks.
547+
It does so based on graph theoretic analysis of connected components,
548+
similar to TCA. Each branch of the structure graph is analyzed to determine
549+
pinch points that indicate a likely error in segmentation that attaches noise
550+
to the image. The pinch threshold determines how many voxels the cross-section
551+
can be before it is considered part of the image.
552+
553+
http://brainsuite.org/processing/surfaceextraction/dewisp/
554+
555+
Examples
556+
--------
557+
558+
>>> from nipype.interfaces import brainsuite
559+
>>> from nipype.testing import example_data
560+
>>> dewisp = brainsuite.Dewisp()
561+
>>> dewisp.inputs.inputMaskFile = example_data('mask.nii')
562+
>>> results = dewisp.run() #doctest: +SKIP
563+
564+
"""
565+
416566
input_spec = DewispInputSpec
417567
output_spec = DewispOutputSpec
418568
_cmd = 'dewisp'
@@ -466,6 +616,23 @@ class DfsOutputSpec(TraitedSpec):
466616

467617

468618
class Dfs(CommandLine):
619+
"""
620+
Surface Generator
621+
Generates mesh surfaces using an isosurface algorithm.
622+
623+
http://brainsuite.org/processing/surfaceextraction/inner-cortical-surface/
624+
625+
Examples
626+
--------
627+
628+
>>> from nipype.interfaces import brainsuite
629+
>>> from nipype.testing import example_data
630+
>>> dfs = brainsuite.Dfs()
631+
>>> dfs.inputs.inputVolumeFile = example_data('structural.nii')
632+
>>> results = dfs.run() #doctest: +SKIP
633+
634+
"""
635+
469636
input_spec = DfsInputSpec
470637
output_spec = DfsOutputSpec
471638
_cmd = 'dfs'
@@ -533,6 +700,25 @@ class PialmeshOutputSpec(TraitedSpec):
533700

534701

535702
class Pialmesh(CommandLine):
703+
"""
704+
pialmesh
705+
computes a pial surface model using an inner WM/GM mesh and a tissue fraction map.
706+
707+
http://brainsuite.org/processing/surfaceextraction/pial/
708+
709+
Examples
710+
--------
711+
712+
>>> from nipype.interfaces import brainsuite
713+
>>> from nipype.testing import example_data
714+
>>> pialmesh = brainsuite.Pialmesh()
715+
>>> pialmesh.inputs.inputSurfaceFile = 'input_mesh.dfs'
716+
>>> pialmesh.inputs.inputTissueFractionFile = 'frac_file.nii.gz'
717+
>>> pialmesh.inputs.inputMaskFile = example_data('mask.nii')
718+
>>> results = pialmesh.run() #doctest: +SKIP
719+
720+
"""
721+
536722
input_spec = PialmeshInputSpec
537723
output_spec = PialmeshOutputSpec
538724
_cmd = 'pialmesh'
@@ -583,6 +769,20 @@ class SkullfinderOutputSpec(TraitedSpec):
583769

584770

585771
class Skullfinder(CommandLine):
772+
"""
773+
Skull and scalp segmentation algorithm.
774+
775+
Examples
776+
--------
777+
778+
>>> from nipype.interfaces import brainsuite
779+
>>> from nipype.testing import example_data
780+
>>> skullfinder = brainsuite.Skullfinder()
781+
>>> skullfinder.inputs.inputMRIFile = example_data('structural.nii')
782+
>>> skullfinder.inputs.inputMaskFile = example_data('mask.nii')
783+
>>> results = skullfinder.run() #doctest: +SKIP
784+
785+
"""
586786
input_spec = SkullfinderInputSpec
587787
output_spec = SkullfinderOutputSpec
588788
_cmd = 'skullfinder'
@@ -628,6 +828,25 @@ class HemisplitOutputSpec(TraitedSpec):
628828

629829

630830
class Hemisplit(CommandLine):
831+
"""
832+
Hemisphere splitter
833+
Splits a surface object into two separate surfaces given an input label volume.
834+
Each vertex is labeled left or right based on the labels being odd (left) or even (right).
835+
The largest contour on the split surface is then found and used as the separation between left and right.
836+
837+
Examples
838+
--------
839+
840+
>>> from nipype.interfaces import brainsuite
841+
>>> from nipype.testing import example_data
842+
>>> hemisplit = brainsuite.Hemisplit()
843+
>>> hemisplit.inputs.inputSurfaceFile = 'input_surf.dfs'
844+
>>> hemisplit.inputs.inputHemisphereLabelFile = 'label.nii'
845+
>>> hemisplit.inputs.pialSurfaceFile = 'pial.dfs'
846+
>>> results = hemisplit.run() #doctest: +SKIP
847+
848+
"""
849+
631850
input_spec = HemisplitInputSpec
632851
output_spec = HemisplitOutputSpec
633852
_cmd = 'hemisplit'

0 commit comments

Comments
 (0)