Code Monkey home page Code Monkey logo

Comments (6)

RanjitK avatar RanjitK commented on June 1, 2024

Hi Gagan, these warning messages are harmless. don't worry about it. Let us know if you have any problems

from c-pac.

gagans avatar gagans commented on June 1, 2024

great, thanks man.

from c-pac.

gagans avatar gagans commented on June 1, 2024

Hi, sorry I have another question.

WHen I am picking

inputspec.func : string (nifti file)
inputspec.mni : string (nifti file)
inputspec.anat : string (nifti file)

do I pick the func, anat, mni with the skull included?

it seems when I choose func to be the nii.gz from edge_detect, the anatomical from brain_warp (nonlinear register), and anatomical mni with the skullstripped, i get incorrect results. The image isn't even aligned properly.

just an update:

i'm now setting func to the functional after the second motion correction (motion_correct_A), the anatomical to the reoriented (anat_preproc/anat_reoriented) anatomical, and mni to the t1mni file with the skull.

using these with the non_linear_reg1 warp nii file and linear_reg_0 mat file seems to work.

i assume this is how its supposed to be done?

btw-- is there a huge loss of information if the registered functional is interpolated into 3x3x3 subvolumes? I thought fMRI resolution was much lower than the anatomical, and so the registered fMRI's spatial dimensions could be reduced through subvolume averaging.

is there a way CPAC can register the functional to the warped anatomical, followed by reducing the registered fMRI's spatial resolution to the original?

from c-pac.

RanjitK avatar RanjitK commented on June 1, 2024

I would use the outputs from the following nodes

anat_brain_only node (skull stripped rpi anatomical image ) -> inputspec.anat
func_mean_skullstrip node (mean, skull stripped, motion corrected image) -> inputspec.func
linear_reg node (affine matrix of linear transformation of brain file) -> inputspec.anat_to_mni_linear_xfm
standard brain image ('usr/fsl/data/standard/MNI152_T1_2mm_brain.nii.gz') -> inputspec.mni
nonlinear_reg node (nonlinear field coefficients file of nonlinear transformation) -> inputspec.anat_to_mni_nonlinear_xfm

You will find the output functional to mni file in the mni_warp node of your working directory, If you want to transform any other functional images into mni, you can simply use the output anatomical_to_mni_nonlinear warp file from registration workflow (nonlinear_reg node) and func_to_anat_linear_xfm affine matrix from register_func_to_mni workflow(linear_reg node) and use fsl applywarp.

example
applywarp --warp=anatomical_to_mni_nonlinear_warp_file --in=input_functional_file.nii.gz --out=input_functional_mni.nii.gz --premat= func_to_anat_linear_xfm --ref=/usr/local/fsl/data/standard/MNI152_T1_2mm_brain.nii.gz

from c-pac.

gagans avatar gagans commented on June 1, 2024

Hi Ranjit,

Turns out changing the functional to the mean skullstripped version did the trick.
I didn't realize that that the functional argument meant a single volume, not the entire fMRI.

Just curious: Is it possible to lower the resolution after registration? The functionals are now in a T1 resolution of 190x230x190; doesn't every 3 x 3 x 3 subvolume of the 1mm anatomical correspond to a single 1 x 1 x 1 voxel in the functional? If so, how can I lower the resolution back to similar dimensions of the unregistered functional?

I registered to a T1 from the MNI site that was 1mm, and so the functionals are high resolution (and big)

from c-pac.

gagans avatar gagans commented on June 1, 2024

Hi Ranjit,

Thanks for your help.

I also found out that the 3dresample will allow me to input the voxel spacing, after registering to the 1.0mm MNI template, thereby producing the desired output.

i appreciate all of your help through this process. what an amazing pipeline.

Just looking at the registered data, it is far superior to SPM.

thank you, ranjit, jovo and sharad.

Thanks,
Gagan

On 2012-11-10, at 4:11 PM, Ranjit Khanuja [email protected] wrote:

I would use the outputs from the following nodes

anat_brain_only node (skull stripped rpi anatomical image ) -> inputspec.anat
func_mean_skullstrip node (mean, skull stripped, motion corrected image) -> inputspec.func
linear_reg node (affine matrix of linear transformation of brain file) -> inputspec.anat_to_mni_linear_xfm
standard brain image ('usr/fsl/data/standard/MNI152_T1_2mm_brain.nii.gz') -> inputspec.mni
nonlinear_reg node (nonlinear field coefficients file of nonlinear transformation) -> inputspec.anat_to_mni_nonlinear_xfm

You will find the output functional to mni file in the mni_warp node of your working directory, If you want to transform any other functional images into mni, you can simply use the output anatomical_to_mni_nonlinear warp file from registration workflow (nonlinear_reg node) and func_to_anat_linear_xfm affine matrix from register_func_to_mni workflow(linear_reg node) and use fsl applywarp.

example
applywarp --warp=anatomical_to_mni_nonlinear_warp_file --in=input_functional_file.nii.gz --out=input_functional_mni.nii.gz --premat= func_to_anat_linear_xfm --ref=/usr/local/fsl/data/standard/MNI152_T1_2mm_brain.nii.gz


Reply to this email directly or view it on GitHub.

from c-pac.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.