Skip to content
This repository was archived by the owner on Sep 3, 2026. It is now read-only.
Discussion options

You must be logged in to vote

Dear @juan-d - found the problem. The tutorial you are following has a hardcoded path that's incorrect.

This works:

import module
await module.load('spm12/r7771')

from nipype.interfaces.matlab import MatlabCommand
from nipype.interfaces.spm import NewSegment
import shutil
from pathlib import Path
import nipype.interfaces.spm as spm
from nipype import Node, Workflow

container_dir = Path(shutil.which("spm12")).parent
container_name = container_dir.name
tpm_img = container_dir / f"{container_name}.simg" / "opt/spm12/spm12_mcr/spm12/spm12/tpm/TPM.nii"

# Use the following tissue specification to get a GM and WM probability map
tissue1 = ((tpm_img, 1), 1, (True,False), (False, False))
tissue…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@juan-d
Comment options

@stebo85
Comment options

Answer selected by stebo85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants