Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPM "new segment" tissues definition #232

Open
bclenet opened this issue Dec 20, 2024 · 2 comments
Open

SPM "new segment" tissues definition #232

bclenet opened this issue Dec 20, 2024 · 2 comments
Labels
💻 aspect: code Concerns the software code in the repository 🤝 help wanted Extra attention is needed SPM

Comments

@bclenet
Copy link
Collaborator

bclenet commented Dec 20, 2024

When using the new segmentation from SPM in Nipype, we currently write the following lines:

# NEW SEGMENT - Unified segmentation using tissue probability maps in SPM12.
spm_tissues_file = join(SPMInfo.getinfo()['path'], 'tpm', 'TPM.nii')
segmentation = Node(NewSegment(), name = 'segmentation')
segmentation.inputs.write_deformation_fields = [False, True]
segmentation.inputs.tissues = [
    [(spm_tissues_file, 1), 2, (True, False), (True, False)], # Grey matter
    [(spm_tissues_file, 2), 2, (True, False), (True, False)], # White matter
    [(spm_tissues_file, 3), 2, (True, False), (True, False)], # CSF
    [(spm_tissues_file, 4), 3, (True, False), (True, False)], # Bone
    [(spm_tissues_file, 5), 4, (True, False), (True, False)], # Soft tissue
    [(spm_tissues_file, 6), 2, (True, False), (True, False)] # Air / background
]

where:

  • spm_tissues_file is the tissue probability map file TPM.nii of SPM
  • each element of the segmentation.inputs.tissues represents a probability map ; the second element of each being the Number of Gaussians (cf. SPM manual page 49) for each tissue.

Currently, I'm not able to find if there are default values for the number of gaussians. And if not, which ones we should set.

The manual (page 50) mentions:

Typical numbers of Gaussians could be two for grey matter, two for white matter, two for CSF, three for bone, four for other soft tissues and two for air (background).

@bclenet bclenet added 🤝 help wanted Extra attention is needed 💻 aspect: code Concerns the software code in the repository SPM labels Dec 20, 2024
@bclenet bclenet changed the title SPM *NewSegment* tissues definition SPM "new segment" tissues definition Dec 20, 2024
@bclenet
Copy link
Collaborator Author

bclenet commented Dec 20, 2024

@cmaumet, could you please let me know if you have an idea about that ?
Thanks !

@bclenet
Copy link
Collaborator Author

bclenet commented Dec 20, 2024

For now, this is needed by:

  • 98BT
  • 0I4U
  • V55J

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository 🤝 help wanted Extra attention is needed SPM
Projects
None yet
Development

No branches or pull requests

1 participant