nipype.interfaces.camino.utils module

ImageStats

Link to code

Bases: CommandLine

Wrapped executable: imagestats.

This program computes voxelwise statistics on a series of 3D images. The images must be in the same space; the operation is performed voxelwise and one output is produced per voxel.

Examples

>>> import nipype.interfaces.camino as cam
>>> imstats = cam.ImageStats()
>>> imstats.inputs.in_files = ['im1.nii','im2.nii','im3.nii']
>>> imstats.inputs.stat = 'max'
>>> imstats.run()                  
Mandatory Inputs:
  • in_files (a list of items which are a pathlike object or string representing an existing file) – List of images to process. They must be in the same space and have the same dimensions. Maps to a command-line argument: -images %s (position: -1).

  • output_root (a pathlike object or string representing a file) – Filename root prepended onto the names of the output files. The extension will be determined from the input. Maps to a command-line argument: -outputroot %s.

  • stat (‘min’ or ‘max’ or ‘mean’ or ‘median’ or ‘sum’ or ‘std’ or ‘var’) – The statistic to compute. Maps to a command-line argument: -stat %s.

Optional Inputs:
  • args (a string) – Additional parameters to the command. Maps to a command-line argument: %s.

  • environ (a dictionary with keys which are a bytes or None or a value of class ‘str’ and with values which are a bytes or None or a value of class ‘str’) – Environment variables. (Nipype default value: {})

  • out_type (‘float’ or ‘char’ or ‘short’ or ‘int’ or ‘long’ or ‘double’) – A Camino data type string, default is “float”. Type must be signed. Maps to a command-line argument: -outputdatatype %s. (Nipype default value: float)

Outputs:

out_file (a pathlike object or string representing an existing file) – Path of the file computed with the statistic chosen.