Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nipype/interfaces/afni/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,7 @@ class TCorrelate(AFNICommand):

def _list_outputs(self):
outputs = self.output_spec().get()

if not isdefined(self.inputs.out_file):
outputs['out_file'] = self._gen_fname(self.inputs.xset,
suffix=self.inputs.suffix)
Expand Down
4 changes: 2 additions & 2 deletions nipype/interfaces/freesurfer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ class SurfaceTransformInputSpec(FSTraitedSpec):
help="subject id of target surface")
target_ico_order = traits.Enum(1, 2, 3, 4, 5, 6, 7, argstr="--trgicoorder %d",
help="order of the icosahedron if target_subject is 'ico'")
source_type = traits.Enum(filetypes, argstr='--sfmt %s', requires=['source_file'],
source_type = traits.Enum(filetypes, argstr='--sfmt %s', requires=['source_file'],
help="source file format")
target_type = traits.Enum(filetypes, argstr='--tfmt %s', help="output format")
reshape = traits.Bool(argstr="--reshape", help="reshape output surface to conform with Nifti")
Expand Down Expand Up @@ -988,7 +988,7 @@ class MakeAverageSubjectOutputSpec(TraitedSpec):

class MakeAverageSubject(FSCommand):
"""Make an average freesurfer subject
Examples
--------
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/fsl/maths.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class MathsInput(FSLCommandInputSpec):
output_datatype = traits.Enum(*_dtypes,
position=-1, argstr="-odt %s",
desc="datatype to use for output (default uses input type)")

nan2zeros = traits.Bool(position=3, argstr='-nan',
desc='change NaNs to zeros before doing anything')

Expand Down
6 changes: 3 additions & 3 deletions nipype/interfaces/fsl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def aggregate_outputs(self, runtime=None, needed_outputs=None):
return outputs

class AvScaleInputSpec(FSLCommandInputSpec):
mat_file = File(exists=True, argstr="%s",
mat_file = File(exists=True, argstr="%s",
desc='mat file to read', position=0)


Expand All @@ -477,7 +477,7 @@ class AvScaleOutputSpec(TraitedSpec):
forward_half_transform = traits.Any(desc='Forward Half Transform')
backward_half_transform = traits.Any(desc='Backwards Half Transform')
left_right_orientation_preserved = traits.Bool(desc='True if LR orientation preserved')

class AvScale(FSLCommand):
"""Use FSL avscale command to extract info from mat file output of FLIRT
Expand Down Expand Up @@ -505,7 +505,7 @@ def lines_to_float(lines):
values = line.split()
out.append([float(val) for val in values])
return out

out = runtime.stdout.split('\n')

outputs.rotation_translation_matrix = lines_to_float(out[1:5])
Expand Down
4 changes: 2 additions & 2 deletions nipype/interfaces/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,7 @@ def capture_provenance():
def push_provenance():
pass


class SQLiteSinkInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec):
database_file = File(exists=True, mandatory = True)
table_name = traits.Str(mandatory=True)
Expand Down Expand Up @@ -1206,7 +1206,7 @@ def _list_outputs(self):
"""
import MySQLdb
if isdefined(self.inputs.config):
conn = MySQLdb.connect(db=self.inputs.database_name,
conn = MySQLdb.connect(db=self.inputs.database_name,
read_default_file=self.inputs.config)
else:
conn = MySQLdb.connect(host=self.inputs.host,
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/nipy/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class FmriRealign4dInputSpec(BaseInterfaceInputSpec):

class FmriRealign4dOutputSpec(TraitedSpec):

out_file = OutputMultiPath(File(exists=True),
out_file = OutputMultiPath(File(exists=True),
desc="Realigned files")
par_file = OutputMultiPath(File(exists=True),
desc="Motion parameter files")
Expand Down
4 changes: 2 additions & 2 deletions nipype/interfaces/nipy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ def _run_interface(self, runtime):

vol1_nii = nb.load(self.inputs.volume1)
vol2_nii = nb.load(self.inputs.volume2)

if isdefined(self.inputs.mask1):
mask1_nii = nb.load(self.inputs.mask1)
mask1_nii = nb.Nifti1Image(nb.load(self.inputs.mask1).get_data() == 1, mask1_nii.get_affine(),
mask1_nii.get_header())
else:
mask1_nii = None

if isdefined(self.inputs.mask2):
mask2_nii = nb.load(self.inputs.mask2)
mask2_nii = nb.Nifti1Image(nb.load(self.inputs.mask2).get_data() == 1, mask2_nii.get_affine(),
Expand Down
20 changes: 10 additions & 10 deletions nipype/interfaces/slicer/converters.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Autogenerated file - DO NOT EDIT
"""Autogenerated file - DO NOT EDIT
If you spot a bug, please report it on the mailing list and/or change the generator."""

from nipype.interfaces.base import CommandLine, CommandLineInputSpec, TraitedSpec, File, Directory, traits, isdefined, InputMultiPath, OutputMultiPath
Expand All @@ -21,27 +21,27 @@ class DicomToNrrdConverterOutputSpec(TraitedSpec):


class DicomToNrrdConverter(SlicerCommandLine):
"""title:
Dicom to Nrrd Converter
"""title:
Dicom to Nrrd Converter
category:
category:
Converters
description:
description:
Converts diffusion weighted MR images in dicom series into Nrrd format for analysis in Slicer. This program has been tested on only a limited subset of DTI dicom formats available from Siemens, GE, and Phillips scanners. Work in progress to support dicom multi-frame data. The program parses dicom header to extract necessary information about measurement frame, diffusion weighting directions, b-values, etc, and write out a nrrd image. For non-diffusion weighted dicom images, it loads in an entire dicom series and writes out a single dicom volume in a .nhdr/.raw pair.
version: 0.2.0.$Revision: 916 $(alpha)
documentation-url: http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.0/Modules/DicomToNrrdConverter
license: https://www.nitrc.org/svn/brains/BuildScripts/trunk/License.txt
license: https://www.nitrc.org/svn/brains/BuildScripts/trunk/License.txt
contributor: Xiaodong Tao
acknowledgements:
acknowledgements:
This work is part of the National Alliance for Medical Image Computing (NAMIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149. Additional support for DTI data produced on Philips scanners was contributed by Vincent Magnotta and Hans Johnson at the University of Iowa.
Expand Down
14 changes: 7 additions & 7 deletions nipype/interfaces/slicer/diffusion/denoising.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Autogenerated file - DO NOT EDIT
"""Autogenerated file - DO NOT EDIT
If you spot a bug, please report it on the mailing list and/or change the generator."""

from nipype.interfaces.base import CommandLine, CommandLineInputSpec, TraitedSpec, File, Directory, traits, isdefined, InputMultiPath, OutputMultiPath
Expand All @@ -23,19 +23,19 @@ class jointLMMSE(SlicerCommandLine):
category: Diffusion.Denoising
description:
description:
This module reduces Rician noise (or unwanted detail) on a set of diffusion weighted images. For this, it filters the image in the mean squared error sense using a Rician noise model. The N closest gradient directions to the direction being processed are filtered together to improve the results: the noise-free signal is seen as an n-diemensional vector which has to be estimated with the LMMSE method from a set of corrupted measurements. To that end, the covariance matrix of the noise-free vector and the cross covariance between this signal and the noise have to be estimated, which is done taking into account the image formation process.
The noise parameter is automatically estimated from a rough segmentation of the background of the image. In this area the signal is simply 0, so that Rician statistics reduce to Rayleigh and the noise power can be easily estimated from the mode of the histogram.
A complete description of the algorithm may be found in:
Antonio Tristan-Vega and Santiago Aja-Fernandez, DWI filtering using joint information for DTI and HARDI, Medical Image Analysis, Volume 14, Issue 2, Pages 205-218. 2010.
Antonio Tristan-Vega and Santiago Aja-Fernandez, DWI filtering using joint information for DTI and HARDI, Medical Image Analysis, Volume 14, Issue 2, Pages 205-218. 2010.
version: 0.1.1.$Revision: 1 $(alpha)
documentation-url: http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.0/Modules/JointRicianLMMSEImageFilter
contributor: Antonio Tristan Vega, Santiago Aja Fernandez. University of Valladolid (SPAIN). Partially founded by grant number TEC2007-67073/TCM from the Comision Interministerial de Ciencia y Tecnologia (Spain).
"""

Expand Down Expand Up @@ -68,11 +68,11 @@ class dwiNoiseFilter(SlicerCommandLine):
category: Diffusion.Denoising
description:
description:
This module reduces noise (or unwanted detail) on a set of diffusion weighted images. For this, it filters the image in the mean squared error sense using a Rician noise model. Images corresponding to each gradient direction, including baseline, are processed individually. The noise parameter is automatically estimated (noise estimation improved but slower).
Note that this is a general purpose filter for MRi images. The module jointLMMSE has been specifically designed for DWI volumes and shows a better performance, so its use is recommended instead.
A complete description of the algorithm in this module can be found in:
S. Aja-Fernandez, M. Niethammer, M. Kubicki, M. Shenton, and C.-F. Westin. Restoration of DWI data using a Rician LMMSE estimator. IEEE Transactions on Medical Imaging, 27(10): pp. 1389-1403, Oct. 2008.
S. Aja-Fernandez, M. Niethammer, M. Kubicki, M. Shenton, and C.-F. Westin. Restoration of DWI data using a Rician LMMSE estimator. IEEE Transactions on Medical Imaging, 27(10): pp. 1389-1403, Oct. 2008.
version: 0.1.1.$Revision: 1 $(alpha)
Expand Down
6 changes: 3 additions & 3 deletions nipype/interfaces/slicer/diffusion/gtract.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Autogenerated file - DO NOT EDIT
"""Autogenerated file - DO NOT EDIT
If you spot a bug, please report it on the mailing list and/or change the generator."""

from nipype.interfaces.base import CommandLine, CommandLineInputSpec, TraitedSpec, File, Directory, traits, isdefined, InputMultiPath, OutputMultiPath
Expand Down Expand Up @@ -102,7 +102,7 @@ class gtractCostFastMarching(SlicerCommandLine):
category: Diffusion.GTRACT
description: This program will use a fast marching fiber tracking algorithm to identify fiber tracts from a tensor image. This program is the first portion of the algorithm. The user must first run gtractFastMarchingTracking to generate the actual fiber tracts. This algorithm is roughly based on the work by G. Parker et al. from IEEE Transactions On Medical Imaging, 21(5): 505-512, 2002. An additional feature of including anisotropy into the vcl_cost function calculation is included.
description: This program will use a fast marching fiber tracking algorithm to identify fiber tracts from a tensor image. This program is the first portion of the algorithm. The user must first run gtractFastMarchingTracking to generate the actual fiber tracts. This algorithm is roughly based on the work by G. Parker et al. from IEEE Transactions On Medical Imaging, 21(5): 505-512, 2002. An additional feature of including anisotropy into the vcl_cost function calculation is included.
version: 4.0.0
Expand Down Expand Up @@ -201,7 +201,7 @@ class gtractTransformToDeformationField(SlicerCommandLine):
license: http://mri.radiology.uiowa.edu/copyright/GTRACT-Copyright.txt
contributor: This tool was developed by Vincent Magnotta, Madhura Ingalhalikar, and Greg Harris
contributor: This tool was developed by Vincent Magnotta, Madhura Ingalhalikar, and Greg Harris
acknowledgements: Funding for this version of the GTRACT program was provided by NIH/NINDS R01NS050568-01A2S1
Expand Down
42 changes: 21 additions & 21 deletions nipype/interfaces/slicer/diffusion/utilities.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Autogenerated file - DO NOT EDIT
"""Autogenerated file - DO NOT EDIT
If you spot a bug, please report it on the mailing list and/or change the generator."""

from nipype.interfaces.base import CommandLine, CommandLineInputSpec, TraitedSpec, File, Directory, traits, isdefined, InputMultiPath, OutputMultiPath
Expand Down Expand Up @@ -44,7 +44,7 @@ class ResampleDTI(SlicerCommandLine):
category: Diffusion.Utilities
description:
description:
Resampling an image is a very important task in image analysis. It is especially important in the frame of image registration. This module implements DT image resampling through the use of itk Transforms. The resampling is controlled by the Output Spacing. "Resampling" is performed in space coordinates, not pixel/grid coordinates. It is quite important to ensure that image spacing is properly set on the images involved. The interpolator is required since the mapping from one space to the other will often require evaluation of the intensity of the image at non-grid positions.
Expand All @@ -54,7 +54,7 @@ class ResampleDTI(SlicerCommandLine):
contributor: Francois Budin
acknowledgements:
acknowledgements:
This work is part of the National Alliance for Medical Image Computing (NAMIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149. Information on the National Centers for Biomedical Computing can be obtained from http://nihroadmap.nih.gov/bioinformatics
Expand All @@ -81,19 +81,19 @@ class DiffusionTensorEstimationOutputSpec(TraitedSpec):


class DiffusionTensorEstimation(SlicerCommandLine):
"""title:
"""title:
Diffusion Tensor Estimation
category:
category:
Diffusion.Utilities
description:
Performs a tensor model estimation from diffusion weighted images.
description:
Performs a tensor model estimation from diffusion weighted images.
There are three estimation methods available: least squares, weigthed least squares and non-linear estimation. The first method is the traditional method for tensor estimation and the fastest one. Weighted least squares takes into account the noise characteristics of the MRI images to weight the DWI samples used in the estimation based on its intensity magnitude. The last method is the more complex.
version: 0.1.0.$Revision: 1892 $(alpha)
Expand All @@ -103,7 +103,7 @@ class DiffusionTensorEstimation(SlicerCommandLine):
contributor: Raul San Jose
acknowledgements: This command module is based on the estimation functionality provided by the Teem library. This work is part of the National Alliance for Medical Image Computing (NAMIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149.
acknowledgements: This command module is based on the estimation functionality provided by the Teem library. This work is part of the National Alliance for Medical Image Computing (NAMIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149.
"""

Expand All @@ -127,13 +127,13 @@ class DiffusionWeightedMaskingOutputSpec(TraitedSpec):


class DiffusionWeightedMasking(SlicerCommandLine):
"""title:
"""title:
Mask from Diffusion Weighted Images
category:
category:
Diffusion.Utilities
description: <p>Performs a mask calculation from a diffusion weighted (DW) image.</p><p>Starting from a dw image, this module computes the baseline image averaging all the images without diffusion weighting and then applies the otsu segmentation algorithm in order to produce a mask. this mask can then be used when estimating the diffusion tensor (dt) image, not to estimate tensors all over the volume.</p>
Expand Down Expand Up @@ -164,17 +164,17 @@ class DiffusionTensorMathematicsOutputSpec(TraitedSpec):


class DiffusionTensorMathematics(SlicerCommandLine):
"""title:
"""title:
Diffusion Tensor Scalar Measurements
category:
category:
Diffusion.Utilities
description:
description:
Compute a set of different scalar measurements from a tensor field, specially oriented for Diffusion Tensors where some rotationally invariant measurements, like Fractional Anisotropy, are highly used to describe the anistropic behaviour of the tensor.
version: 0.1.0.$Revision: 1892 $(alpha)
Expand Down
10 changes: 5 additions & 5 deletions nipype/interfaces/slicer/filtering/arithmetic.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Autogenerated file - DO NOT EDIT
"""Autogenerated file - DO NOT EDIT
If you spot a bug, please report it on the mailing list and/or change the generator."""

from nipype.interfaces.base import CommandLine, CommandLineInputSpec, TraitedSpec, File, Directory, traits, isdefined, InputMultiPath, OutputMultiPath
Expand All @@ -21,7 +21,7 @@ class Cast(SlicerCommandLine):
category: Filtering.Arithmetic
description:
description:
Cast a volume to a given data type.
Use at your own risk when casting an input volume into a lower precision type!
Allows casting to the same type as the input volume.
Expand All @@ -32,7 +32,7 @@ class Cast(SlicerCommandLine):
contributor: Nicole Aucoin, BWH (Ron Kikinis, BWH)
acknowledgements:
acknowledgements:
This work is part of the National Alliance for Medical Image Computing (NAMIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149.
Expand Down Expand Up @@ -60,7 +60,7 @@ class Add(SlicerCommandLine):
category: Filtering.Arithmetic
description:
description:
Adds two images. Although all image types are supported on input, only signed types are produced. The two images do not have to have the same dimensions.
Expand All @@ -70,7 +70,7 @@ class Add(SlicerCommandLine):
contributor: Bill Lorensen
acknowledgements:
acknowledgements:
This work is part of the National Alliance for Medical Image Computing (NAMIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149.
Expand Down
Loading