FLEX

class sbl.sabre.interfaces.FuzzyCMeansCluster(command=None, **inputs)

Apply Fuzzy C-Means (FCM) clustering to each 2D slice of a 3D image.

Input attributes:

Parameters:
  • input_image – Input masked T1 image as an existing file name
  • num_clusters – Number of clusters to identify as an integer
  • cluster – Cluster to return in default output as an integer
  • exponent – Exponent as an integer
  • max_iterations – Maximum number of iterations as an integer
  • min_improvement – Minimum improvement on current iteration as a float
  • output_image – Output image as a file name (optional, if output_suffix is not provided)
  • output_suffix – Output suffix (if output_image not provided) as a string (optional, if output_image is not provided, default=_FCM)

Typical values are:

exponent = 2
max_iterations = 100
min_improvement = 0.00001

Output attributes:

Parameters:
  • output_image – Output image as an existing file name
  • output_cluster[1...num_clusters] – Output clusters

Example:

>>> fuzzycluster = FuzzyCMeansCluster()
>>> fuzzycluster.inputs.input_image = '{session}_T1.nii.gz'
>>> fuzzycluster.inputs.num_clusters = 4
>>> fuzzycluster.inputs.cluster = 2
>>> fuzzycluster.inputs.exponent = 2
>>> fuzzycluster.inputs.max_iterations = 100
>>> fuzzycluster.inputs.min_improvement = 0.00001
>>> print fuzzycluster.cmdline
'FLEX_fcm {session}_T1.nii.gz 4 2 100 0.00001'
>>> fuzzycluster.run() 

Previous topic

Brain region parcellation

Next topic

Automated Image Registration (AIR)

This Page