@@ -507,131 +507,6 @@ class Despike(AFNICommand):
507
507
output_spec = AFNICommandOutputSpec
508
508
509
509
510
- class CentralityInputSpec (AFNICommandInputSpec ):
511
- """
512
- inherits the out_file parameter from AFNICommandOutputSpec base class
513
- """
514
-
515
- in_file = File (desc = 'input file to 3dDegreeCentrality' ,
516
- argstr = '%s' ,
517
- position = - 1 ,
518
- mandatory = True ,
519
- exists = True ,
520
- copyfile = False )
521
-
522
- mask = File (desc = 'mask file to mask input data' ,
523
- argstr = "-mask %s" ,
524
- exists = True )
525
-
526
- thresh = traits .Float (desc = 'threshold to exclude connections where corr <= thresh' ,
527
- argstr = '-thresh %f' )
528
-
529
- polort = traits .Int (desc = '' , argstr = '-polort %d' )
530
-
531
- autoclip = traits .Bool (desc = 'Clip off low-intensity regions in the dataset' ,
532
- argstr = '-autoclip' )
533
-
534
- automask = traits .Bool (desc = 'Mask the dataset to target brain-only voxels' ,
535
- argstr = '-automask' )
536
-
537
-
538
- class DegreeCentralityInputSpec (CentralityInputSpec ):
539
- """
540
- inherits the out_file parameter from AFNICommandOutputSpec base class
541
- """
542
-
543
- in_file = File (desc = 'input file to 3dDegreeCentrality' ,
544
- argstr = '%s' ,
545
- position = - 1 ,
546
- mandatory = True ,
547
- exists = True ,
548
- copyfile = False )
549
-
550
- mask = File (desc = 'mask file to mask input data' ,
551
- argstr = "-mask %s" ,
552
- exists = True )
553
-
554
- thresh = traits .Float (desc = 'threshold to exclude connections where corr <= thresh' ,
555
- argstr = '-thresh %f' )
556
-
557
- sparsity = traits .Float (desc = 'only take the top percent of connections' ,
558
- argstr = '-sparsity %f' )
559
-
560
- out_1d = traits .Str (desc = 'output filepath to text dump of correlation matrix' ,
561
- argstr = '-out1D' )
562
-
563
- polort = traits .Int (desc = '' , argstr = '-polort %d' )
564
-
565
- autoclip = traits .Bool (desc = 'Clip off low-intensity regions in the dataset' ,
566
- argstr = '-autoclip' )
567
-
568
- automask = traits .Bool (desc = 'Mask the dataset to target brain-only voxels' ,
569
- argstr = '-automask' )
570
-
571
-
572
- class DegreeCentralityOutputSpec (AFNICommandOutputSpec ):
573
- """
574
- inherits the out_file parameter from AFNICommandOutputSpec base class
575
- """
576
-
577
- one_d_file = File (desc = 'The text output of the similarity matrix computed' \
578
- 'after thresholding with one-dimensional and ' \
579
- 'ijk voxel indices, correlations, image extents, ' \
580
- 'and affine matrix' )
581
-
582
-
583
- class DegreeCentrality (AFNICommand ):
584
- """Performs degree centrality on a dataset using a given maskfile
585
- via 3dDegreeCentrality
586
-
587
- For complete details, see the `3dDegreeCentrality Documentation.
588
- <http://afni.nimh.nih.gov/pub/dist/doc/program_help/3dDegreeCentrality.html>
589
-
590
- Examples
591
- ========
592
-
593
- >>> from nipype.interfaces import afni as afni
594
- >>> degree = afni.DegreeCentrality()
595
- >>> degree.inputs.in_file = 'func_preproc.nii'
596
- >>> degree.inputs.mask = 'mask.nii'
597
- >>> degree.inputs.sparsity = 1 # keep the top one percent of connections
598
- >>> degree.cmdline
599
- '3dDegreeCentrality -sparsity 1 -mask mask.nii func_preproc.nii'
600
- >>> res = degree.run() # doctest: +SKIP
601
- """
602
-
603
- _cmd = '3dDegreeCentrality'
604
- input_spec = DegreeCentralityInputSpec
605
- output_spec = DegreeCentralityOutputSpec
606
-
607
-
608
- class AutomaskInputSpec (AFNICommandInputSpec ):
609
- in_file = File (desc = 'input file to 3dAutomask' ,
610
- argstr = '%s' ,
611
- position = - 1 ,
612
- mandatory = True ,
613
- exists = True ,
614
- copyfile = False )
615
-
616
- out_file = File (name_template = "%s_mask" , desc = 'output image file name' ,
617
- argstr = '-prefix %s' , name_source = "in_file" )
618
-
619
- brain_file = File (name_template = "%s_masked" ,
620
- desc = "output file from 3dAutomask" ,
621
- argstr = '-apply_prefix %s' ,
622
- name_source = "in_file" )
623
-
624
- clfrac = traits .Float (desc = 'sets the clip level fraction' +
625
- ' (must be 0.1-0.9). ' +
626
- 'A small value will tend to make the mask larger [default = 0.5].' ,
627
- argstr = "-clfrac %s" )
628
-
629
- dilate = traits .Int (desc = 'dilate the mask outwards' ,
630
- argstr = "-dilate %s" )
631
-
632
- erode = traits .Int (desc = 'erode the mask inwards' ,
633
- argstr = "-erode %s" )
634
-
635
510
636
511
class AutomaskOutputSpec (TraitedSpec ):
637
512
out_file = File (desc = 'mask file' ,
0 commit comments