I want to transform a manually created mask to multiple BOLD images (of the same subject).
Using FSL, this is a two step process:
- Calculate the transform (
- in_file - BOLD image that corresponds to the manually created mask
- reference - the BOLD images
- Apply the transform (
out_matrix_file's name is based off of
in_file. Is there a way to get it based off of
I had two ideas on how to do this, but I haven't been successful in figuring out how to get either to work. The ideas are:
- Set the name_source of out_matrix_file, although this seems hardcoded.
- Use substitution on the output directories. I can't figure out how to replace the generic names (ie. "maskthresh0") with the names of the BOLD images. I read something on this in an old thread ([https://groups.google.com/forum/#!topic/nipy-user/n1dyIIk-c8](https://groups.google.com/forum/#!topic/nipy-user/n1dy_IIk-c8)) , but as far as I can tell, this hasn't been implemented in the core nipype.
- Swap the reference and image in FLIRT and then calculate the inverse of the transform. This resolves the issue for the first step, but then the same problem occurs with ApplyXFM (the
ApplyXFM is the manual mask).
How can I get the output of the transformed images to be named after the BOLD images of the transformed masks instead of the manual mask or it's corresponding BOLD image?