class IQMFileSinkInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec): in_file = Str(mandatory=True, desc='path of input file relative to BIDS root') subject_id = Str(mandatory=True, desc='the subject id') modality = Str(mandatory=True, desc='the qc type') session_id = traits.Either(None, Str, usedefault=True) task_id = traits.Either(None, Str, usedefault=True) acq_id = traits.Either(None, Str, usedefault=True) rec_id = traits.Either(None, Str, usedefault=True) run_id = traits.Either(None, Str, usedefault=True) dataset = Str(desc='dataset identifier') metadata = traits.Dict() provenance = traits.Dict() root = traits.Dict(desc='output root dictionary') out_dir = File(desc='the output directory') _outputs = traits.Dict(value={}, usedefault=True) def __setattr__(self, key, value): if key not in self.copyable_trait_names(): if not isdefined(value): super(IQMFileSinkInputSpec, self).__setattr__(key, value) self._outputs[key] = value else: if key in self._outputs: self._outputs[key] = value super(IQMFileSinkInputSpec, self).__setattr__(key, value)
class _DerivativesDataSinkInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec): base_directory = traits.Directory( desc='Path to the base directory for storing data.') check_hdr = traits.Bool(True, usedefault=True, desc='fix headers of NIfTI outputs') compress = traits.Bool( desc="force compression (True) or uncompression (False)" " of the output file (default: same as input)") desc = Str('', usedefault=True, desc='Label for description field') extra_values = traits.List(Str) in_file = InputMultiObject(File(exists=True), mandatory=True, desc='the object to be saved') keep_dtype = traits.Bool(False, usedefault=True, desc='keep datatype suffix') meta_dict = traits.DictStrAny( desc='an input dictionary containing metadata') source_file = File(exists=False, mandatory=True, desc='the input func file') space = Str('', usedefault=True, desc='Label for space field') suffix = Str('', usedefault=True, desc='suffix appended to source_file')
class UploadIQMsInputSpec(BaseInterfaceInputSpec): in_iqms = File(exists=True, mandatory=True, desc="the input IQMs-JSON file") url = Str(mandatory=True, desc="URL (protocol and name) listening") port = traits.Int(desc="MRIQCWebAPI service port") path = Str(desc="MRIQCWebAPI endpoint root path") email = Str(desc="set sender email") strict = traits.Bool( False, usedefault=True, desc="crash if upload was not succesfull" )
class BIDSGrabInputSpec(BaseInterfaceInputSpec): # TODO: Check this inteface, why are there 'either file or list'? ~Mateusz fmri_prep_files = List() fmri_prep_aroma_files = Either(List(ImageFile()), File()) conf_raw_files = Either(List(File(exists=True)), File(exists=True)) conf_json_files = Either(List(File(exists=True)), File(exists=True)) subject = Str() task = Str() session = Str() run = Int()
class MaskToolInputSpec(AFNICommandInputSpec): in_files = InputMultiPath(File(desc='input file to 3dmerge', exists=True), argstr='-input %s', position=-1, mandatory=True, copyfile=False) out_file = File(name_template='%s_mask', desc='output image file name', argstr='-prefix %s', name_source='in_files') count = traits.Bool( desc='Instead of created a binary 0/1 mask dataset, create one with ' 'counts of voxel overlap, i.e., each voxel will contain the ' 'number of masks that it is set in.', argstr='-count', position=2) datum = traits.Enum( 'byte', 'short', 'float', argstr='-datum %s', desc='specify data type for output. Valid types are \'byte\', ' '\'short\' and \'float\'.') dilate_inputs = Str( desc='Use this option to dilate and/or erode datasets as they are ' 'read. ex. \'5 -5\' to dilate and erode 5 times', argstr='-dilate_inputs %s') dilate_results = Str( desc='dilate and/or erode combined mask at the given levels.', argstr='-dilate_results %s') frac = traits.Float( desc='When combining masks (across datasets and sub-bricks), use ' 'this option to restrict the result to a certain fraction of the ' 'set of volumes', argstr='-frac %s') inter = traits.Bool(desc='intersection, this means -frac 1.0', argstr='-inter') union = traits.Bool(desc='union, this means -frac 0', argstr='-union') fill_holes = traits.Bool( desc='This option can be used to fill holes in the resulting mask, ' 'i.e. after all other processing has been done.', argstr='-fill_holes') fill_dirs = Str( desc='fill holes only in the given directions. This option is for use ' 'with -fill holes. should be a single string that specifies ' '1-3 of the axes using {x,y,z} labels (i.e. dataset axis order), ' 'or using the labels in {R,L,A,P,I,S}.', argstr='-fill_dirs %s', requires=['fill_holes']) verbose = traits.Int(desc='specify verbosity level, for 0 to 3', argstr='-verb %s')
class SubjectSummaryInputSpec(BaseInterfaceInputSpec): t1w = InputMultiObject(File(exists=True), desc='T1w structural images') t2w = InputMultiObject(File(exists=True), desc='T2w structural images') subjects_dir = Directory(desc='FreeSurfer subjects directory') subject_id = Str(desc='Subject ID') fs_spaces = traits.List(desc='Target spaces') template = InputMultiObject(Str, desc='Template space')
class MP2RAGESkullStripInputSpec(BaseInterfaceInputSpec): second_inversion = File( exists=True, mandatory=True, desc='Second inversion image derived from MP2RAGE sequence') t1_weighted = File(exists=True, mandatory=True, desc='T1-weighted image derived from MP2RAGE sequence' ' (also referred to as “uniform” image) At least one of' ' t1_weighted and t1_map is required') t1_map = File( exists=True, mandatory=True, desc='Quantitative T1 map image derived from MP2RAGE' 'sequence At least one of t1_weighted and t1_map is required', ) skip_zero_values = traits.Bool( True, use_defaul=True, desc='Ignores voxels with zero value (default is True)') topology_lut_dir = Directory( desc='Path to directory in which topology files ' 'are stored (default is stored in TOPOLOGY_LUT_DIR)') prefix = Str(desc='Prefix of the resulting filenames')
class _DerivativesDataSinkInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec): base_directory = traits.Directory( desc="Path to the base directory for storing data.") check_hdr = traits.Bool(True, usedefault=True, desc="fix headers of NIfTI outputs") compress = InputMultiObject( traits.Either(None, traits.Bool), usedefault=True, desc= "whether ``in_file`` should be compressed (True), uncompressed (False) " "or left unmodified (None, default).", ) data_dtype = Str( desc="NumPy datatype to coerce NIfTI data to, or `source` to" "match the input file dtype") dismiss_entities = InputMultiObject( traits.Either(None, Str), usedefault=True, desc="a list entities that will not be propagated from the source file", ) in_file = InputMultiObject(File(exists=True), mandatory=True, desc="the object to be saved") meta_dict = traits.DictStrAny( desc="an input dictionary containing metadata") source_file = InputMultiObject( File(exists=False), mandatory=True, desc="the source file(s) to extract entities from")
class SubjectSummaryInputSpec(BaseInterfaceInputSpec): t1w = InputMultiPath(File(exists=True), desc='T1w structural images') t2w = InputMultiPath(File(exists=True), desc='T2w structural images') subjects_dir = Directory(desc='FreeSurfer subjects directory') subject_id = Str(desc='Subject ID') dwi_groupings = traits.Dict( desc='groupings of DWI files and their output names') output_spaces = traits.List(desc='Target spaces') template = traits.Enum('MNI152NLin2009cAsym', desc='Template space')
class SubjectSummaryInputSpec(BaseInterfaceInputSpec): t1w = InputMultiPath(File(exists=True), desc='T1w structural images') t2w = InputMultiPath(File(exists=True), desc='T2w structural images') subjects_dir = Directory(desc='FreeSurfer subjects directory') subject_id = Str(desc='Subject ID') bold = InputMultiPath(traits.Either(File(exists=True), traits.List(File(exists=True))), desc='BOLD functional series') output_spaces = traits.List(desc='Target spaces') template = traits.Enum('MNI152NLin2009cAsym', desc='Template space')
class SubjectSummaryInputSpec(BaseInterfaceInputSpec): t1w = InputMultiObject(File(exists=True), desc='T1w structural images') t2w = InputMultiObject(File(exists=True), desc='T2w structural images') subjects_dir = Directory(desc='FreeSurfer subjects directory') subject_id = Str(desc='Subject ID') bold = InputMultiObject(traits.Either(File(exists=True), traits.List(File(exists=True))), desc='BOLD functional series') std_spaces = traits.List(Str, desc='list of standard spaces') nstd_spaces = traits.List(Str, desc='list of non-standard spaces')
class TStatInputSpec(AFNICommandInputSpec): in_file = File( desc="input file to 3dTstat", argstr="%s", position=-1, mandatory=True, exists=True, copyfile=False, ) index = Str(desc="AFNI indexing string for in_file") out_file = File( name_template="%s_tstat", desc="output image file name", argstr="-prefix %s", name_source="in_file", ) mask = File(desc="mask file", argstr="-mask %s", exists=True) options = Str(desc="selected statistical output", argstr="%s")
class ReadSidecarJSONOutputSpec(TraitedSpec): subject_id = Str() session_id = Str() task_id = Str() acq_id = Str() rec_id = Str() run_id = Str() out_dict = traits.Dict() relative_path = Str()
class SubjectSummaryInputSpec(BaseInterfaceInputSpec): t1w = InputMultiObject(File(exists=True), desc="T1w structural images") t2w = InputMultiObject(File(exists=True), desc="T2w structural images") subjects_dir = Directory(desc="FreeSurfer subjects directory") subject_id = Str(desc="Subject ID") dwi = InputMultiObject( traits.Either(File(exists=True), traits.List(File(exists=True))), desc="DWI files", ) std_spaces = traits.List(Str, desc="list of standard spaces") nstd_spaces = traits.List(Str, desc="list of non-standard spaces")
class BIDSValidateInputSpec(BaseInterfaceInputSpec): # Root directory only required argument bids_dir = Directory( exists=True, required=True, desc='BIDS dataset root directory' ) # Default: 'fmriprep' derivatives = traits.List(desc='Specifies name of derivatives directory') # Separate queries from user tasks = traits.List(Str(), desc='Names of tasks to denoise') sessions = traits.List(Str(), desc='Labels of sessions to denoise') subjects = traits.List(Str(), desc='Labels of subjects to denoise') runs = traits.List(Int(), desc='Labels of runs to denoise') # Pipelines from user or default pipelines = traits.List( File(), desc='List of paths to selected pipelines' )
class IQMFileSinkInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec): subject_id = Str(mandatory=True, desc='the subject id') modality = Str(mandatory=True, desc='the qc type') session_id = traits.Either(None, Str, usedefault=True) task_id = traits.Either(None, Str, usedefault=True) acq_id = traits.Either(None, Str, usedefault=True) rec_id = traits.Either(None, Str, usedefault=True) run_id = traits.Either(None, Str, usedefault=True) md5sum = Str() save_extra = traits.Bool(True, usedefault=True, desc='save extra metadata') root = traits.Dict(desc='output root dictionary') out_dir = File(desc='the output directory') _outputs = traits.Dict(value={}, usedefault=True) def __setattr__(self, key, value): if key not in self.copyable_trait_names(): if not isdefined(value): super(IQMFileSinkInputSpec, self).__setattr__(key, value) self._outputs[key] = value else: if key in self._outputs: self._outputs[key] = value super(IQMFileSinkInputSpec, self).__setattr__(key, value)
class CompositeTransformUtilInputSpec(ANTSCommandInputSpec): process = traits.Enum( 'assemble', 'disassemble', argstr='--%s', position=1, usedefault=True, desc='What to do with the transform inputs (assemble or disassemble)', ) in_file = InputMultiPath(File(exists=True), mandatory=True, argstr='%s...', position=2, desc='Input transform file(s)') output_prefix = Str("transform", usedefault=True, argstr='%s', position=3, desc="A prefix that is prepended to all output files")
class _ROIsPlotInputSpecRPT(nrb._SVGReportCapableInputSpec): in_file = File( exists=True, mandatory=True, desc="the volume where ROIs are defined" ) in_rois = InputMultiPath( File(exists=True), mandatory=True, desc="a list of regions to be plotted" ) in_mask = File(exists=True, desc="a special region, eg. the brain mask") masked = traits.Bool(False, usedefault=True, desc="mask in_file prior plotting") colors = traits.Either( None, traits.List(Str), usedefault=True, desc="use specific colors for contours" ) levels = traits.Either( None, traits.List(traits.Float), usedefault=True, desc="pass levels to nilearn.plotting", ) mask_color = Str("r", usedefault=True, desc="color for mask")
class ROIsPlotInputSpecRPT(nrc.SVGReportCapableInputSpec): in_file = File(exists=True, mandatory=True, desc='the volume where ROIs are defined') in_rois = InputMultiPath(File(exists=True), mandatory=True, desc='a list of regions to be plotted') in_mask = File(exists=True, desc='a special region, eg. the brain mask') masked = traits.Bool(False, usedefault=True, desc='mask in_file prior plotting') colors = traits.Either(None, traits.List(Str), usedefault=True, desc='use specific colors for contours') levels = traits.Either(None, traits.List(traits.Float), usedefault=True, desc='pass levels to nilearn.plotting') mask_color = Str('r', usedefault=True, desc='color for mask')
class _BIDSDataGrabberInputSpec(BaseInterfaceInputSpec): subject_data = traits.Dict(Str, traits.Any) subject_id = Str()
class TimecourseNormalizationInputSpec(BaseInterfaceInputSpec): in_file = File(exists=True, desc="functional image") mask_file = File(exists=True, desc="mask image") method = Str(desc="normalization method ('z' or 'psc')")
class SubjectSummaryOutputSpec(SummaryOutputSpec): # This exists to ensure that the summary is run prior to the first ReconAll # call, allowing a determination whether there is a pre-existing directory subject_id = Str(desc='FreeSurfer subject ID')
class AboutSummaryInputSpec(BaseInterfaceInputSpec): version = Str(desc='FMRIPREP version') command = Str(desc='FMRIPREP command')
class AboutSummaryInputSpec(BaseInterfaceInputSpec): version = Str(desc='dMRIPrep version') command = Str(desc='dMRIPrep command')
class TopupSummaryInputSpec(BaseInterfaceInputSpec): summary = Str(desc='Summary of TOPUP inputs')
class CAT12SegmentInputSpec(SPMCommandInputSpec): in_files = InputMultiPath( ImageFileSPM(exists=True), field="data", desc="file to segment", mandatory=True, copyfile=False, ) _help_tpm = ( "Tissue Probability Map. Select the tissue probability image that includes 6 tissue probability " "classes for (1) grey matter, (2) white matter, (3) cerebrospinal fluid, (4) bone, (5) non-brain " "soft tissue, and (6) the background. CAT uses the TPM only for the initial SPM segmentation." ) tpm = InputMultiPath( ImageFileSPM(exists=True), field="tpm", desc=_help_tpm, mandatory=False, copyfile=False, ) _help_shoots_tpm = ( "Shooting Template %d. The Shooting template must be in multi-volume nifti format and should contain GM," " WM, and background segmentations and have to be saved with at least 16 bit. " ) shooting_tpm = ImageFileSPM( exists=True, field="extopts.registration.shooting.shootingtpm", desc=_help_shoots_tpm % 0, mandatory=False, copyfile=False, ) shooting_tpm_template_1 = ImageFileSPM(exists=True, desc=_help_shoots_tpm % 1, mandatory=False, copyfile=False) shooting_tpm_template_2 = ImageFileSPM(exists=True, desc=_help_shoots_tpm % 2, mandatory=False, copyfile=False) shooting_tpm_template_3 = ImageFileSPM(exists=True, desc=_help_shoots_tpm % 3, mandatory=False, copyfile=False) shooting_tpm_template_4 = ImageFileSPM(exists=True, desc=_help_shoots_tpm % 4, mandatory=False, copyfile=False) n_jobs = traits.Int(1, usedefault=True, mandatory=True, field="nproc", desc="Number of threads") _help_affine_reg = ( "Affine Regularization. The procedure is a local optimisation, so it needs reasonable initial " "starting estimates. Images should be placed in approximate alignment using the Display " "function of SPM before beginning. A Mutual Information affine registration with the tissue " "probability maps (D" "Agostino et al, 2004) is used to achieve approximate alignment.") affine_regularization = Str(default_value="mni", field="opts.affreg", usedefault=True, desc=_help_affine_reg) _help_bias_acc = ( "Strength of the SPM inhomogeneity (bias) correction that simultaneously controls the SPM " "biasreg, biasfwhm, samp (resolution), and tol (iteration) parameter.") power_spm_inhomogeneity_correction = traits.Float(default_value=0.5, field="opts.biasacc", usedefault=True, desc=_help_bias_acc) # Extended options for CAT12 preprocessing _help_app = ( "Affine registration and SPM preprocessing can fail in some subjects with deviating anatomy (e.g. " "other species/neonates) or in images with strong signal inhomogeneities, or untypical intensities " "(e.g. synthetic images). An initial bias correction can help to reduce such problems (see details " 'below). Recommended are the "default" and "full" option.') affine_preprocessing = traits.Int(1070, field="extopts.APP", desc=_help_app, usedefault=True) _help_initial_seg = ( "In rare cases the Unified Segmentation can fail in highly abnormal brains, where e.g. the " "cerebrospinal fluid of superlarge ventricles (hydrocephalus) were classified as white " "matter. However, if the affine registration is correct, the AMAP segmentation with an " "prior-independent k-means initialization can be used to replace the SPM brain tissue " "classification. Moreover, if the default Dartel and Shooting registrations will fail then " 'rhe "Optimized Shooting - superlarge ventricles" option for "Spatial registration" is ! ' "required Values: \nnone: 0;\nlight: 1;\nfull: 2;\ndefault: 1070.") initial_segmentation = traits.Int(0, field="extopts.spm_kamap", desc=_help_initial_seg, usedefault=True) _help_las = ( "Additionally to WM-inhomogeneities, GM intensity can vary across different regions such as the motor" " cortex, the basal ganglia, or the occipital lobe. These changes have an anatomical background " "(e.g. iron content, myelinization), but are dependent on the MR-protocol and often lead to " "underestimation of GM at higher intensities and overestimation of CSF at lower intensities. " "Therefore, a local intensity transformation of all tissue classes is used to reduce these effects in" " the image. This local adaptive segmentation (LAS) is applied before the final AMAP segmentation." "Possible Values: \nSPM Unified Segmentation: 0 \nk-means AMAP: 2") local_adaptive_seg = traits.Float(0.5, field="extopts.LASstr", usedefault=True, desc=_help_las) _help_gcutstr = ( "Method of initial skull-stripping before AMAP segmentation. The SPM approach works quite stable " "for the majority of data. However, in some rare cases parts of GM (i.e. in frontal lobe) might " "be cut. If this happens the GCUT approach is a good alternative. GCUT is a graph-cut/region-" "growing approach starting from the WM area. APRG (adaptive probability region-growing) is a new" " method that refines the probability maps of the SPM approach by region-growing techniques of " "the gcut approach with a final surface-based optimization strategy. This is currently the method" " with the most accurate and reliable results. If you use already skull-stripped data you can " "turn off skull-stripping although this is automaticaly detected in most cases. Please note that " "the choice of the skull-stripping method will also influence the estimation of TIV, because the" " methods mainly differ in the handling of the outer CSF around the cortical surface. " "\nPossible Values:\n - none (already skull-stripped): -1;\n - SPM approach: 0; " "\n - GCUT approach: 0.50; \n - APRG approach: 2") skull_strip = traits.Float(2, field="extopts.gcutstr", desc=_help_gcutstr, usedefault=True) _help_wmhc = ( "WARNING: Please note that the detection of WM hyperintensies is still under development and does " "not have the same accuracy as approaches that additionally consider FLAIR images (e.g. Lesion " "Segmentation Toolbox)! In aging or (neurodegenerative) diseases WM intensity can be reduced " "locally in T1 or increased in T2/PD images. These so-called WM hyperintensies (WMHs) can lead to " "preprocessing errors. Large GM areas next to the ventricle can cause normalization problems. " "Therefore, a temporary correction for normalization is useful if WMHs are expected. CAT allows " "different ways to handle WMHs: " "\n0) No Correction (handled as GM). \n1) Temporary (internal) correction as WM for spatial " "normalization and estimation of cortical thickness. \n2) Permanent correction to WM. " ) wm_hyper_intensity_correction = traits.Int(1, field="extopts.WMHC", desc=_help_wmhc, usedefault=True) _help_vox = ( "The (isotropic) voxel sizes of any spatially normalised written images. A non-finite value will be " "replaced by the average voxel size of the tissue probability maps used by the segmentation." ) voxel_size = traits.Float(1.5, field="extopts.vox", desc=_help_vox, usedefault=True) _help_resampling = ( "Internal resampling for preprocessing.\n The default fixed image resolution offers a good " "trade-off between optimal quality and preprocessing time and memory demands. Standard " "structural data with a voxel resolution around 1mm or even data with high in-plane resolution" " and large slice thickness (e.g. 0.5x0.5x1.5 mm) will benefit from this setting. If you have" ' higher native resolutions the highres option "Fixed 0.8 mm" will sometimes offer slightly' " better preprocessing quality with an increase of preprocessing time and memory demands. In" " case of even higher resolutions and high signal-to-noise ratio (e.g. for 7 T data) the " '"Best native" option will process the data on the highest native resolution. A resolution' " of 0.4x0.7x1.0 mm will be interpolated to 0.4x0.4x0.4 mm. A tolerance range of 0.1 mm is " "used to avoid interpolation artifacts, i.e. a resolution of 0.95x1.01x1.08 mm will not be " 'interpolated in case of the "Fixed 1.0 mm"! This "optimal" option prefers an isotropic voxel ' "size with at least 1.1 mm that is controlled by the median voxel size and a volume term that " "penalizes highly anisotropic voxels." "Values:\nOptimal: [1.0 0.1]\nFixed 1.0 mm: [1.0 0.1];\nFixed 0.8 mm:[0.8 0.1]" "\nBest native: [0.5 0.1]") internal_resampling_process = traits.Tuple( traits.Float(1), traits.Float(0.1), minlen=2, maxlen=2, usedefault=True, field="extopts.restypes.optimal", desc="help_resampling", ) _errors_help = ( "Error handling.\nTry to catch preprocessing errors and continue with the next data set or ignore " "all warnings (e.g., bad intensities) and use an experimental pipeline which is still in " "development. In case of errors, CAT continues with the next subject if this option is enabled. If " "the experimental option with backup functions is selected and warnings occur, CAT will try to use" " backup routines and skip some processing steps which require good T1 contrasts (e.g., LAS). If " "you want to avoid processing of critical data and ensure that only the main pipeline is used then" ' select the option "Ignore errors (continue with the next subject)". It is strongly recommended ' "to check for preprocessing problems, especially with non-T1 contrasts. " "\nValues:\nnone: 0,\ndefault: 1,\ndetails: 2.") ignore_errors = traits.Int(1, field="extopts.ignoreErrors", desc=_errors_help, usedefault=True) # Writing options _help_surf = ( "Surface and thickness estimation. \nUse projection-based thickness (PBT) (Dahnke et al. 2012) to" " estimate cortical thickness and to create the central cortical surface for left and right " "hemisphere. Surface reconstruction includes topology correction (Yotter et al. 2011), spherical " "inflation (Yotter et al.) and spherical registration. Additionally you can also estimate surface " "parameters such as gyrification, cortical complexity or sulcal depth that can be subsequently " "analyzed at each vertex of the surface. Please note, that surface reconstruction and spherical " "registration additionally requires about 20-60 min of computation time. A fast (1-3 min) surface " "pipeline is available for visual preview (e.g., to check preprocessing quality) in the " "cross-sectional, but not in the longitudinal pipeline. Only the initial surfaces are created with " "a lower resolution and without topology correction, spherical mapping and surface registration. " "Please note that the files with the estimated surface thickness can therefore not be used for " 'further analysis! For distinction, these files contain "preview" in their filename and they' " are not available as batch dependencies objects. ") surface_and_thickness_estimation = traits.Int(1, field="surface", desc=_help_surf, usedefault=True) surface_measures = traits.Int( 1, field="output.surf_measures", usedefault=True, desc="Extract surface measures", ) # Templates neuromorphometrics = traits.Bool( True, field="output.ROImenu.atlases.neuromorphometrics", usedefault=True, desc="Extract brain measures for Neuromorphometrics template", ) lpba40 = traits.Bool( True, field="output.ROImenu.atlases.lpba40", usedefault=True, desc="Extract brain measures for LPBA40 template", ) cobra = traits.Bool( True, field="output.ROImenu.atlases.hammers", usedefault=True, desc="Extract brain measures for COBRA template", ) hammers = traits.Bool( True, field="output.ROImenu.atlases.cobra", usedefault=True, desc="Extract brain measures for Hammers template", ) own_atlas = InputMultiPath( ImageFileSPM(exists=True), field="output.ROImenu.atlases.ownatlas", desc="Extract brain measures for a given template", mandatory=False, copyfile=False, ) # Grey matter gm_output_native = traits.Bool( False, field="output.GM.native", usedefault=True, desc="Save modulated grey matter images.", ) gm_output_modulated = traits.Bool( True, field="output.GM.mod", usedefault=True, desc="Save native grey matter images.", ) gm_output_dartel = traits.Bool( False, field="output.GM.dartel", usedefault=True, desc="Save dartel grey matter images.", ) # White matter _wm_desc = "Options to save white matter images." wm_output_native = traits.Bool( False, field="output.WM.native", usedefault=True, desc="Save dartel white matter images.", ) wm_output_modulated = traits.Bool( True, field="output.WM.mod", usedefault=True, desc="Save dartel white matter images.", ) wm_output_dartel = traits.Bool( False, field="output.WM.dartel", usedefault=True, desc="Save dartel white matter images.", ) # CSF matter _csf_desc = "Options to save CSF images." csf_output_native = traits.Bool( False, field="output.CSF.native", usedefault=True, desc="Save dartel CSF images.", ) csf_output_modulated = traits.Bool(True, field="output.CSF.mod", usedefault=True, desc="Save dartel CSF images.") csf_output_dartel = traits.Bool( False, field="output.CSF.dartel", usedefault=True, desc="Save dartel CSF images.", ) # Labels _help_label_desc = ( "This is the option to save a labeled version of your segmentations in the %s space for fast visual " "comparision. Labels are saved as Partial Volume Estimation (PVE) values with different mix " "classes for GM-WM (2.5) and GM-CSF (1.5). BG=0, CSF=1, GM=2, WM=3, WMH=4 (if WMHC=3), " "SL=1.5 (if SLC)") label_native = traits.Bool( False, field="output.label.native", usedefault=True, desc=_help_label_desc % "native", ) label_warped = traits.Bool( True, field="output.label.warped", usedefault=True, desc=_help_label_desc % "warped", ) label_dartel = traits.Bool( False, field="output.label.dartel", usedefault=True, desc=_help_label_desc % "dartel", ) output_labelnative = traits.Bool( False, field="output.labelnative", usedefault=True, desc=_help_label_desc % "native", ) # Bias save_bias_corrected = traits.Bool( True, field="output.bias.warped", usedefault=True, desc="Save bias corrected image", ) # las _las_desc = ( "This is the option to save a bias, noise, and local intensity corrected version of the original T1" " image in the %s space. MR images are usually corrupted by a smooth, spatially varying artifact that modulates the" " intensity of the image (bias). These artifacts, although not usually a problem for visual " "inspection, can impede automated processing of the images. The bias corrected version should have " "more uniform intensities within the different types of tissues and can be saved in native space " "and/or normalised. Noise is corrected by an adaptive non-local mean (NLM) filter (Manjon 2008, " "Medical Image Analysis 12).") las_native = traits.Bool(False, field="output.las.native", usedefault=True, desc=_las_desc % "native") las_warped = traits.Bool(True, field="output.las.warped", usedefault=True, desc=_las_desc % "warped") las_dartel = traits.Bool(False, field="output.las.dartel", usedefault=True, desc=_las_desc % "dartel") # Jacobian Warped _help_jacobian = ( "This is the option to save the Jacobian determinant, which expresses local volume changes. This" " image can be used in a pure deformation based morphometry (DBM) design. Please note that the" " affine part of the deformation field is ignored. Thus, there is no need for any additional" " correction for different brain sizes using ICV.") jacobianwarped = traits.Bool(True, field="output.jacobianwarped", usedefault=True, desc=_help_jacobian) # Deformation Fields _help_warp = ( "Deformation fields can be saved to disk, and used by the Deformations Utility and/or applied to " "coregistered data from other modalities (e.g. fMRI). For spatially normalising images to MNI space," " you will need the forward deformation, whereas for spatially normalising (eg) GIFTI surface files," " you" "ll need the inverse. It is also possible to transform data in MNI space on to the individual" " subject, which also requires the inverse transform. Deformations are saved as .nii files, which" " contain three volumes to encode the x, y and z coordinates." "\nValues: No:[0 0];\nImage->Template (forward): [1 0];\nTemplate->Image (inverse): [0 1]; " "\ninverse + forward: [1 1]") warps = traits.Tuple( traits.Int(1), traits.Int(0), minlen=2, maxlen=2, field="output.warps", usedefault=True, desc=_help_warp, )
class _KeySelectInputSpec(DynamicTraitedSpec): key = Str(mandatory=True, desc="selective key") keys = InputMultiObject(Str, mandatory=True, min=1, desc="index of keys")
class _SubjectSummaryInputSpec(BaseInterfaceInputSpec): t1w = InputMultiObject(File(exists=True), desc="T1w structural images") t2w = InputMultiObject(File(exists=True), desc="T2w structural images") subjects_dir = Directory(desc="FreeSurfer subjects directory") subject_id = Str(desc="Subject ID") output_spaces = InputMultiObject(Str, desc="list of standard spaces")
class _AboutSummaryInputSpec(BaseInterfaceInputSpec): version = Str(desc="sMRIPrep version") command = Str(desc="sMRIPrep command")
class _KeySelectOutputSpec(DynamicTraitedSpec): key = Str(desc="propagates selected key")