Hello freesurfer experts,
A volume file I want to save as a mask(the orange/red shaded areas in the picture) on top of my volume file does not align as seen in the picture. I have used mri_vol2vol to align the mask to my native volume but apparently it did not work out. I am trying to correct this by using mri_mask now; I tried to use the option -xform %s which apparently applies the LTA transform to align mask to input volume, but now I get this error;
lab@lab-ThinkStation-E31:~/Desktop/freesurfer/subjects/sub-01_MW/mri$ mri_mask -xform %s MW_IIHC_aTAL.nii native.areas_MW_aTAL.nii MW_aTAl_masked.nii
transform file name is %s WARNING: hdr.dim[4] = 0 (nframes), setting to 1 niiRead(): NIFTI_UNITS_UNKNOWN, assuming mm DoAbs = 0 Apply the given LTA xfrom to the mask volume Reading transform ... ltaReadFile(%s): can't open file No such file or directory mri_mask.bin: could not read transform file %s No such file or directory
I would deeply appreciate if someone could help me sort out this mess.
Thank you all! Best, Idil
Hi Idil
how did you create the mask and the transform? Also, you can't specify "%s" on the command line - you need an actual name of a transform file.
cheers Bruce
On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
Hello freesurfer experts,
A volume file I want to save as a mask(the orange/red shaded areas in the picture) on top of my volume file does not align as seen in the picture. I have used mri_vol2vol to align the mask to my native volume but apparently it did not work out. I am trying to correct this by using mri_mask now; I tried to use the option -xform %s which apparently applies the LTA transform to align mask to input volume, but now I get this error;
lab@lab-ThinkStation-E31:~/Desktop/freesurfer/subjects/sub-01_MW/mri$
mri_mask -xform %s MW_IIHC_aTAL.nii native.areas_MW_aTAL.nii MW_aTAl_masked.nii transform file name is %s WARNING: hdr.dim[4] = 0 (nframes), setting to 1 niiRead(): NIFTI_UNITS_UNKNOWN, assuming mm DoAbs = 0 Apply the given LTA xfrom to the mask volume Reading transform ... ltaReadFile(%s): can't open file No such file or directory mri_mask.bin: could not read transform file %s No such file or directory
I would deeply appreciate if someone could help me sort out this mess.
Thank you all! Best, Idil
The mask in volume format was created using a docker image and it works well both with my freesurfer origin and native volume files; the one that it doesn't align with is the volume file I am trying to adapt to/from a different software. The command line I used for transforming is this;
mri_vol2vol --mov native.template_areas.mgh --targ MW_IIHC_aTAL.nii --regheader --o template.mgz --no-save-reg
Best, Idil
________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:14 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
Hi Idil
how did you create the mask and the transform? Also, you can't specify "%s" on the command line - you need an actual name of a transform file.
cheers Bruce
On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
Hello freesurfer experts,
A volume file I want to save as a mask(the orange/red shaded areas in the picture) on top of my volume file does not align as seen in the picture. I have used mri_vol2vol to align the mask to my native volume but apparently it did not work out. I am trying to correct this by using mri_mask now; I tried to use the option -xform %s which apparently applies the LTA transform to align mask to input volume, but now I get this error;
lab@lab-ThinkStation-E31:~/Desktop/freesurfer/subjects/sub-01_MW/mri$
mri_mask -xform %s MW_IIHC_aTAL.nii native.areas_MW_aTAL.nii MW_aTAl_masked.nii transform file name is %s WARNING: hdr.dim[4] = 0 (nframes), setting to 1 niiRead(): NIFTI_UNITS_UNKNOWN, assuming mm DoAbs = 0 Apply the given LTA xfrom to the mask volume Reading transform ... ltaReadFile(%s): can't open file No such file or directory mri_mask.bin: could not read transform file %s No such file or directory
I would deeply appreciate if someone could help me sort out this mess.
Thank you all! Best, Idil
ok, but your mri_mask command line has the string "%s" in it, which is not correct. You need to specify an actual file name. I also think you are better off using mri_convert -at <transform file name> .... to map the mask into the right coordinate system so that you can then view it in freeview to make sure it is correct
cheers Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
The mask in volume format was created using a docker image and it works well both with my freesurfer origin and native volume files; the one that it doesn't align with is the volume file I am trying to adapt to/from a different software. The command line I used for transforming is this;
mri_vol2vol --mov native.template_areas.mgh --targ MW_IIHC_aTAL.nii --regheader --o template.mgz --no-save-reg
Best, Idil
From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:14 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
Hi Idil
how did you create the mask and the transform? Also, you can't specify "%s" on the command line - you need an actual name of a transform file.
cheers Bruce
On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
Hello freesurfer experts,
A volume file I want to save as a mask(the orange/red shaded areas in the picture) on top of my volume file does not align as seen in the picture. I have used mri_vol2vol to align the mask to my native volume but apparently it did not work out. I am trying to correct this by using mri_mask now; I tried to use the option -xform %s which apparently applies the LTA transform to align mask to input volume, but now I get this error;
lab@lab-ThinkStation-E31:~/Desktop/freesurfer/subjects/sub-01_MW/mri$
mri_mask -xform %s MW_IIHC_aTAL.nii native.areas_MW_aTAL.nii MW_aTAl_masked.nii transform file name is %s WARNING: hdr.dim[4] = 0 (nframes), setting to 1 niiRead(): NIFTI_UNITS_UNKNOWN, assuming mm DoAbs = 0 Apply the given LTA xfrom to the mask volume Reading transform ... ltaReadFile(%s): can't open file No such file or directory mri_mask.bin: could not read transform file %s No such file or directory
I would deeply appreciate if someone could help me sort out this mess.
Thank you all! Best, Idil
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Thank you!
Then I guess I would use the volume as the transform file to convert my mask.
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:41 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
ok, but your mri_mask command line has the string "%s" in it, which is not correct. You need to specify an actual file name. I also think you are better off using mri_convert -at <transform file name> .... to map the mask into the right coordinate system so that you can then view it in freeview to make sure it is correct
cheers Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
The mask in volume format was created using a docker image and it works well both with my freesurfer origin and native volume files; the one that it doesn't align with is the volume file I am trying to adapt to/from a different software. The command line I used for transforming is this;
mri_vol2vol --mov native.template_areas.mgh --targ MW_IIHC_aTAL.nii --regheader --o template.mgz --no-save-reg
Best, Idil
From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:14 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
Hi Idil
how did you create the mask and the transform? Also, you can't specify "%s" on the command line - you need an actual name of a transform file.
cheers Bruce
On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
Hello freesurfer experts,
A volume file I want to save as a mask(the orange/red shaded areas in the picture) on top of my volume file does not align as seen in the picture. I have used mri_vol2vol to align the mask to my native volume but apparently it did not work out. I am trying to correct this by using mri_mask now; I tried to use the option -xform %s which apparently applies the LTA transform to align mask to input volume, but now I get this error;
lab@lab-ThinkStation-E31:~/Desktop/freesurfer/subjects/sub-01_MW/mri$
mri_mask -xform %s MW_IIHC_aTAL.nii native.areas_MW_aTAL.nii MW_aTAl_masked.nii transform file name is %s WARNING: hdr.dim[4] = 0 (nframes), setting to 1 niiRead(): NIFTI_UNITS_UNKNOWN, assuming mm DoAbs = 0 Apply the given LTA xfrom to the mask volume Reading transform ... ltaReadFile(%s): can't open file No such file or directory mri_mask.bin: could not read transform file %s No such file or directory
I would deeply appreciate if someone could help me sort out this mess.
Thank you all! Best, Idil
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
sorry, I don't understand Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
Thank you!
Then I guess I would use the volume as the transform file to convert my mask.
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:41 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
ok, but your mri_mask command line has the string "%s" in it, which is not correct. You need to specify an actual file name. I also think you are better off using mri_convert -at <transform file name> .... to map the mask into the right coordinate system so that you can then view it in freeview to make sure it is correct
cheers Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
The mask in volume format was created using a docker image and it works well both with my freesurfer origin and native volume files; the one that it doesn't align with is the volume file I am trying to adapt to/from a different software. The command line I used for transforming is this;
mri_vol2vol --mov native.template_areas.mgh --targ MW_IIHC_aTAL.nii --regheader --o template.mgz --no-save-reg
Best, Idil
From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:14 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
Hi Idil
how did you create the mask and the transform? Also, you can't specify "%s" on the command line - you need an actual name of a transform file.
cheers Bruce
On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
Hello freesurfer experts,
A volume file I want to save as a mask(the orange/red shaded areas in the picture) on top of my volume file does not align as seen in the picture. I have used mri_vol2vol to align the mask to my native volume but apparently it did not work out. I am trying to correct this by using mri_mask now; I tried to use the option -xform %s which apparently applies the LTA transform to align mask to input volume, but now I get this error;
lab@lab-ThinkStation-E31:~/Desktop/freesurfer/subjects/sub-01_MW/mri$
mri_mask -xform %s MW_IIHC_aTAL.nii native.areas_MW_aTAL.nii MW_aTAl_masked.nii transform file name is %s WARNING: hdr.dim[4] = 0 (nframes), setting to 1 niiRead(): NIFTI_UNITS_UNKNOWN, assuming mm DoAbs = 0 Apply the given LTA xfrom to the mask volume Reading transform ... ltaReadFile(%s): can't open file No such file or directory mri_mask.bin: could not read transform file %s No such file or directory
I would deeply appreciate if someone could help me sort out this mess.
Thank you all! Best, Idil
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
I do not have a transform file I can use so I was wondering if I can simply use the volume file I am trying to adapt the mask to as the transform file in the -at option. But looks like I cannot;
mri_convert -at MW_IIHC_aTAL.nii native.template.mgh native.orientation.mgh mri_convert.bin -at MW_IIHC_aTAL.nii native.template_.mgh native.orientation.mgh $Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $ reading from native.template.mgh... TR=1000.00, TE=0.00, TI=0.00, flip angle=0.00 i_ras = (-1, 0, -9.31323e-10) j_ras = (0, -1.49012e-08, -1) k_ras = (-1.62981e-09, 1, 1.49012e-08) INFO: Reading transformation from file MW_IIHC_aTAL.nii... Reading transform with LTAreadEx() INFO: This REGISTER_DAT transform is valid only for volumes between COR types with c_(r,a,s) = 0. regio_read_register(): No such file or directory Error reading inplaneres from MW_IIHC_aTAL.nii ltaReadRegisterDat: could not read MW_IIHC_aTAL.nii No such file or directory ERROR: Reading transform from file MW_IIHC_aTAL.nii
________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:50 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
sorry, I don't understand Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
Thank you!
Then I guess I would use the volume as the transform file to convert my mask.
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:41 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
ok, but your mri_mask command line has the string "%s" in it, which is not correct. You need to specify an actual file name. I also think you are better off using mri_convert -at <transform file name> .... to map the mask into the right coordinate system so that you can then view it in freeview to make sure it is correct
cheers Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
The mask in volume format was created using a docker image and it works well both with my freesurfer origin and native volume files; the one that it doesn't align with is the volume file I am trying to adapt to/from a different software. The command line I used for transforming is this;
mri_vol2vol --mov native.template_areas.mgh --targ MW_IIHC_aTAL.nii --regheader --o template.mgz --no-save-reg
Best, Idil
From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:14 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
Hi Idil
how did you create the mask and the transform? Also, you can't specify "%s" on the command line - you need an actual name of a transform file.
cheers Bruce
On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
Hello freesurfer experts,
A volume file I want to save as a mask(the orange/red shaded areas in the picture) on top of my volume file does not align as seen in the picture. I have used mri_vol2vol to align the mask to my native volume but apparently it did not work out. I am trying to correct this by using mri_mask now; I tried to use the option -xform %s which apparently applies the LTA transform to align mask to input volume, but now I get this error;
lab@lab-ThinkStation-E31:~/Desktop/freesurfer/subjects/sub-01_MW/mri$
mri_mask -xform %s MW_IIHC_aTAL.nii native.areas_MW_aTAL.nii MW_aTAl_masked.nii transform file name is %s WARNING: hdr.dim[4] = 0 (nframes), setting to 1 niiRead(): NIFTI_UNITS_UNKNOWN, assuming mm DoAbs = 0 Apply the given LTA xfrom to the mask volume Reading transform ... ltaReadFile(%s): can't open file No such file or directory mri_mask.bin: could not read transform file %s No such file or directory
I would deeply appreciate if someone could help me sort out this mess.
Thank you all! Best, Idil
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
if you want to reslice the mask to be like a template volume, use "-rl" instead of "-at"
cheers Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
I do not have a transform file I can use so I was wondering if I can simply use the volume file I am trying to adapt the mask to as the transform file in the -at option. But looks like I cannot;
mri_convert -at MW_IIHC_aTAL.nii native.template.mgh native.orientation.mgh mri_convert.bin -at MW_IIHC_aTAL.nii native.template_.mgh native.orientation.mgh $Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $ reading from native.template.mgh... TR=1000.00, TE=0.00, TI=0.00, flip angle=0.00 i_ras = (-1, 0, -9.31323e-10) j_ras = (0, -1.49012e-08, -1) k_ras = (-1.62981e-09, 1, 1.49012e-08) INFO: Reading transformation from file MW_IIHC_aTAL.nii... Reading transform with LTAreadEx() INFO: This REGISTER_DAT transform is valid only for volumes between COR types with c_(r,a,s) = 0. regio_read_register(): No such file or directory Error reading inplaneres from MW_IIHC_aTAL.nii ltaReadRegisterDat: could not read MW_IIHC_aTAL.nii No such file or directory ERROR: Reading transform from file MW_IIHC_aTAL.nii
From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:50 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
sorry, I don't understand Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
Thank you!
Then I guess I would use the volume as the transform file to convert my mask.
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:41 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
ok, but your mri_mask command line has the string "%s" in it, which is not correct. You need to specify an actual file name. I also think you are better off using mri_convert -at <transform file name> .... to map the mask into the right coordinate system so that you can then view it in freeview to make sure it is correct
cheers Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
The mask in volume format was created using a docker image and it works well both with my freesurfer origin and native volume files; the one that it doesn't align with is the volume file I am trying to adapt to/from a different software. The command line I used for transforming is this;
mri_vol2vol --mov native.template_areas.mgh --targ MW_IIHC_aTAL.nii --regheader --o template.mgz --no-save-reg
Best, Idil
From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:14 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
Hi Idil
how did you create the mask and the transform? Also, you can't specify "%s" on the command line - you need an actual name of a transform file.
cheers Bruce
On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
Hello freesurfer experts,
A volume file I want to save as a mask(the orange/red shaded areas in the picture) on top of my volume file does not align as seen in the picture. I have used mri_vol2vol to align the mask to my native volume but apparently it did not work out. I am trying to correct this by using mri_mask now; I tried to use the option -xform %s which apparently applies the LTA transform to align mask to input volume, but now I get this error;
lab@lab-ThinkStation-E31:~/Desktop/freesurfer/subjects/sub-01_MW/mri$
mri_mask -xform %s MW_IIHC_aTAL.nii native.areas_MW_aTAL.nii MW_aTAl_masked.nii transform file name is %s WARNING: hdr.dim[4] = 0 (nframes), setting to 1 niiRead(): NIFTI_UNITS_UNKNOWN, assuming mm DoAbs = 0 Apply the given LTA xfrom to the mask volume Reading transform ... ltaReadFile(%s): can't open file No such file or directory mri_mask.bin: could not read transform file %s No such file or directory
I would deeply appreciate if someone could help me sort out this mess.
Thank you all! Best, Idil
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
It seems to be in the right orientation now but there is still an alignment problem; the mask is too far off from the brain. Sorry to be constantly asking questions; but do you have any suggestions onto how to fix this?
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:55 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
if you want to reslice the mask to be like a template volume, use "-rl" instead of "-at"
cheers Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
I do not have a transform file I can use so I was wondering if I can simply use the volume file I am trying to adapt the mask to as the transform file in the -at option. But looks like I cannot;
mri_convert -at MW_IIHC_aTAL.nii native.template.mgh native.orientation.mgh mri_convert.bin -at MW_IIHC_aTAL.nii native.template_.mgh native.orientation.mgh $Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $ reading from native.template.mgh... TR=1000.00, TE=0.00, TI=0.00, flip angle=0.00 i_ras = (-1, 0, -9.31323e-10) j_ras = (0, -1.49012e-08, -1) k_ras = (-1.62981e-09, 1, 1.49012e-08) INFO: Reading transformation from file MW_IIHC_aTAL.nii... Reading transform with LTAreadEx() INFO: This REGISTER_DAT transform is valid only for volumes between COR types with c_(r,a,s) = 0. regio_read_register(): No such file or directory Error reading inplaneres from MW_IIHC_aTAL.nii ltaReadRegisterDat: could not read MW_IIHC_aTAL.nii No such file or directory ERROR: Reading transform from file MW_IIHC_aTAL.nii
From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:50 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
sorry, I don't understand Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
Thank you!
Then I guess I would use the volume as the transform file to convert my mask.
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:41 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
ok, but your mri_mask command line has the string "%s" in it, which is not correct. You need to specify an actual file name. I also think you are better off using mri_convert -at <transform file name> .... to map the mask into the right coordinate system so that you can then view it in freeview to make sure it is correct
cheers Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
The mask in volume format was created using a docker image and it works well both with my freesurfer origin and native volume files; the one that it doesn't align with is the volume file I am trying to adapt to/from a different software. The command line I used for transforming is this;
mri_vol2vol --mov native.template_areas.mgh --targ MW_IIHC_aTAL.nii --regheader --o template.mgz --no-save-reg
Best, Idil
From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:14 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
Hi Idil
how did you create the mask and the transform? Also, you can't specify "%s" on the command line - you need an actual name of a transform file.
cheers Bruce
On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
Hello freesurfer experts,
A volume file I want to save as a mask(the orange/red shaded areas in the picture) on top of my volume file does not align as seen in the picture. I have used mri_vol2vol to align the mask to my native volume but apparently it did not work out. I am trying to correct this by using mri_mask now; I tried to use the option -xform %s which apparently applies the LTA transform to align mask to input volume, but now I get this error;
lab@lab-ThinkStation-E31:~/Desktop/freesurfer/subjects/sub-01_MW/mri$
mri_mask -xform %s MW_IIHC_aTAL.nii native.areas_MW_aTAL.nii MW_aTAl_masked.nii transform file name is %s WARNING: hdr.dim[4] = 0 (nframes), setting to 1 niiRead(): NIFTI_UNITS_UNKNOWN, assuming mm DoAbs = 0 Apply the given LTA xfrom to the mask volume Reading transform ... ltaReadFile(%s): can't open file No such file or directory mri_mask.bin: could not read transform file %s No such file or directory
I would deeply appreciate if someone could help me sort out this mess.
Thank you all! Best, Idil
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Hi Idil
you need to give us much more information to be able to help you. How did you create the mask? Why volume to you expect it to be in register with? What are the volumes MW_IIHC_aTAL.nii native.template.mgh and native.orientation.mgh ?
Bruce
On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
It seems to be in the right orientation now but there is still an alignment problem; the mask is too far off from the brain. Sorry to be constantly asking questions; but do you have any suggestions onto how to fix this?
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:55 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
if you want to reslice the mask to be like a template volume, use "-rl" instead of "-at"
cheers Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
I do not have a transform file I can use so I was wondering if I can simply use the volume file I am trying to adapt the mask to as the transform file in the -at option. But looks like I cannot;
mri_convert -at MW_IIHC_aTAL.nii native.template.mgh native.orientation.mgh mri_convert.bin -at MW_IIHC_aTAL.nii native.template_.mgh native.orientation.mgh $Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $ reading from native.template.mgh... TR=1000.00, TE=0.00, TI=0.00, flip angle=0.00 i_ras = (-1, 0, -9.31323e-10) j_ras = (0, -1.49012e-08, -1) k_ras = (-1.62981e-09, 1, 1.49012e-08) INFO: Reading transformation from file MW_IIHC_aTAL.nii... Reading transform with LTAreadEx() INFO: This REGISTER_DAT transform is valid only for volumes between COR types with c_(r,a,s) = 0. regio_read_register(): No such file or directory Error reading inplaneres from MW_IIHC_aTAL.nii ltaReadRegisterDat: could not read MW_IIHC_aTAL.nii No such file or directory ERROR: Reading transform from file MW_IIHC_aTAL.nii
From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:50 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
sorry, I don't understand Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
Thank you!
Then I guess I would use the volume as the transform file to convert my mask.
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:41 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
ok, but your mri_mask command line has the string "%s" in it, which is not correct. You need to specify an actual file name. I also think you are better off using mri_convert -at <transform file name> .... to map the mask into the right coordinate system so that you can then view it in freeview to make sure it is correct
cheers Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
The mask in volume format was created using a docker image and it works well both with my freesurfer origin and native volume files; the one that it doesn't align with is the volume file I am trying to adapt to/from a different software. The command line I used for transforming is this;
mri_vol2vol --mov native.template_areas.mgh --targ MW_IIHC_aTAL.nii --regheader --o template.mgz --no-save-reg
Best, Idil
From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:14 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
Hi Idil
how did you create the mask and the transform? Also, you can't specify "%s" on the command line - you need an actual name of a transform file.
cheers Bruce
On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
Hello freesurfer experts,
A volume file I want to save as a mask(the orange/red shaded areas in the picture) on top of my volume file does not align as seen in the picture. I have used mri_vol2vol to align the mask to my native volume but apparently it did not work out. I am trying to correct this by using mri_mask now; I tried to use the option -xform %s which apparently applies the LTA transform to align mask to input volume, but now I get this error;
> lab@lab-ThinkStation-E31:~/Desktop/freesurfer/subjects/sub-01_MW/mri$
mri_mask -xform %s MW_IIHC_aTAL.nii native.areas_MW_aTAL.nii MW_aTAl_masked.nii transform file name is %s WARNING: hdr.dim[4] = 0 (nframes), setting to 1 niiRead(): NIFTI_UNITS_UNKNOWN, assuming mm DoAbs = 0 Apply the given LTA xfrom to the mask volume Reading transform ... ltaReadFile(%s): can't open file No such file or directory mri_mask.bin: could not read transform file %s No such file or directory
I would deeply appreciate if someone could help me sort out this mess.
Thank you all! Best, Idil
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Yes; sorry. The mask is created by an applied docker image which produced volume and surface files of the template in both the brain's native and freesurfer origin orientation. MW_IIHC_aTAL.nii is the brain file of the same subject I exported from another software-I am hoping to export the template eventually to use in there-. native.template.mgh is the template file produced by the docker; it is the red/orange areas in the picture I sent. native.orientation.mgh is just a random name I gave to the output file.
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 7:03 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
Hi Idil
you need to give us much more information to be able to help you. How did you create the mask? Why volume to you expect it to be in register with? What are the volumes MW_IIHC_aTAL.nii native.template.mgh and native.orientation.mgh ?
Bruce
On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
It seems to be in the right orientation now but there is still an alignment problem; the mask is too far off from the brain. Sorry to be constantly asking questions; but do you have any suggestions onto how to fix this?
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:55 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
if you want to reslice the mask to be like a template volume, use "-rl" instead of "-at"
cheers Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
I do not have a transform file I can use so I was wondering if I can simply use the volume file I am trying to adapt the mask to as the transform file in the -at option. But looks like I cannot;
mri_convert -at MW_IIHC_aTAL.nii native.template.mgh native.orientation.mgh mri_convert.bin -at MW_IIHC_aTAL.nii native.template_.mgh native.orientation.mgh $Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $ reading from native.template.mgh... TR=1000.00, TE=0.00, TI=0.00, flip angle=0.00 i_ras = (-1, 0, -9.31323e-10) j_ras = (0, -1.49012e-08, -1) k_ras = (-1.62981e-09, 1, 1.49012e-08) INFO: Reading transformation from file MW_IIHC_aTAL.nii... Reading transform with LTAreadEx() INFO: This REGISTER_DAT transform is valid only for volumes between COR types with c_(r,a,s) = 0. regio_read_register(): No such file or directory Error reading inplaneres from MW_IIHC_aTAL.nii ltaReadRegisterDat: could not read MW_IIHC_aTAL.nii No such file or directory ERROR: Reading transform from file MW_IIHC_aTAL.nii
From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:50 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
sorry, I don't understand Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
Thank you!
Then I guess I would use the volume as the transform file to convert my mask.
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:41 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
ok, but your mri_mask command line has the string "%s" in it, which is not correct. You need to specify an actual file name. I also think you are better off using mri_convert -at <transform file name> .... to map the mask into the right coordinate system so that you can then view it in freeview to make sure it is correct
cheers Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
The mask in volume format was created using a docker image and it works well both with my freesurfer origin and native volume files; the one that it doesn't align with is the volume file I am trying to adapt to/from a different software. The command line I used for transforming is this;
mri_vol2vol --mov native.template_areas.mgh --targ MW_IIHC_aTAL.nii --regheader --o template.mgz --no-save-reg
Best, Idil
From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:14 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
Hi Idil
how did you create the mask and the transform? Also, you can't specify "%s" on the command line - you need an actual name of a transform file.
cheers Bruce
On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
Hello freesurfer experts,
A volume file I want to save as a mask(the orange/red shaded areas in the picture) on top of my volume file does not align as seen in the picture. I have used mri_vol2vol to align the mask to my native volume but apparently it did not work out. I am trying to correct this by using mri_mask now; I tried to use the option -xform %s which apparently applies the LTA transform to align mask to input volume, but now I get this error;
> lab@lab-ThinkStation-E31:~/Desktop/freesurfer/subjects/sub-01_MW/mri$
mri_mask -xform %s MW_IIHC_aTAL.nii native.areas_MW_aTAL.nii MW_aTAl_masked.nii transform file name is %s WARNING: hdr.dim[4] = 0 (nframes), setting to 1 niiRead(): NIFTI_UNITS_UNKNOWN, assuming mm DoAbs = 0 Apply the given LTA xfrom to the mask volume Reading transform ... ltaReadFile(%s): can't open file No such file or directory mri_mask.bin: could not read transform file %s No such file or directory
I would deeply appreciate if someone could help me sort out this mess.
Thank you all! Best, Idil
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
I looked at their orientation differences using mri_info and used this command; mri_convert --in_orientation LIA --out_orientation AIL native.template.mgh native.corrected.nii But still there is an alignment problem. Looks like the xform info differs so can I use the mri_mask command with specifying the xform option?
This info is for the mask volume I want to use; type: MGH dimensions: 256 x 256 x 256 voxel sizes: 1.000000, 1.000000, 1.000000 type: FLOAT (3) fov: 256.000 dof: 0 xstart: -128.0, xend: 128.0 ystart: -128.0, yend: 128.0 zstart: -128.0, zend: 128.0 TR: 1000.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degrees nframes: 1 PhEncDir: UNKNOWN FieldStrength: 0.000000 ras xform present xform info: x_r = -1.0000, y_r = 0.0000, z_r = -0.0000, c_r = 3.2153 : x_a = 0.0000, y_a = -0.0000, z_a = 1.0000, c_a = -10.8083 : x_s = -0.0000, y_s = -1.0000, z_s = 0.0000, c_s = -8.7367
talairach xfm : Orientation : LIA Primary Slice Direction: coronal
voxel to ras transform: -1.0000 0.0000 -0.0000 131.2153 0.0000 -0.0000 1.0000 -138.8083 -0.0000 -1.0000 0.0000 119.2633 0.0000 0.0000 0.0000 1.0000
voxel-to-ras determinant -1
ras to voxel transform: -1.0000 -0.0000 0.0000 131.2153 0.0000 0.0000 -1.0000 119.2633 0.0000 1.0000 -0.0000 138.8084 -0.0000 -0.0000 -0.0000 1.0000
This information is of the volume file I want to overlay the mask on;
Volume information for MW_IIHC_aTAL.nii type: nii dimensions: 256 x 256 x 256 voxel sizes: 1.000000, 1.000000, 1.000000 type: FLOAT (3) fov: 256.000 dof: 0 xstart: -128.0, xend: 128.0 ystart: -128.0, yend: 128.0 zstart: -128.0, zend: 128.0 TR: 0.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degrees nframes: 1 PhEncDir: UNKNOWN FieldStrength: 0.000000 ras xform present xform info: x_r = -0.0553, y_r = 0.0101, z_r = -0.9984, c_r = -3.7597 : x_a = 0.9863, y_a = 0.1563, z_a = -0.0530, c_a = 11.9244 : x_s = 0.1555, y_s = -0.9877, z_s = -0.0186, c_s = -9.5782 Orientation : AIL Primary Slice Direction: sagittal
voxel to ras transform: -0.0553 0.0101 -0.9984 129.8205 0.9863 0.1563 -0.0530 -127.5422 0.1555 -0.9877 -0.0186 99.3136 0.0000 0.0000 0.0000 1.0000
voxel-to-ras determinant 1
ras to voxel transform: -0.0553 0.9863 0.1555 117.5212 0.0101 0.1563 -0.9877 116.7140 -0.9984 -0.0530 -0.0186 124.7003 0.0000 0.0000 0.0000 1.0000
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Yagmur Ozdemir 19 [yozdemir19@amherst.edu] Sent: Thursday, August 17, 2017 7:07 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
Yes; sorry. The mask is created by an applied docker image which produced volume and surface files of the template in both the brain's native and freesurfer origin orientation. MW_IIHC_aTAL.nii is the brain file of the same subject I exported from another software-I am hoping to export the template eventually to use in there-. native.template.mgh is the template file produced by the docker; it is the red/orange areas in the picture I sent. native.orientation.mgh is just a random name I gave to the output file.
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 7:03 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
Hi Idil
you need to give us much more information to be able to help you. How did you create the mask? Why volume to you expect it to be in register with? What are the volumes MW_IIHC_aTAL.nii native.template.mgh and native.orientation.mgh ?
Bruce
On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
It seems to be in the right orientation now but there is still an alignment problem; the mask is too far off from the brain. Sorry to be constantly asking questions; but do you have any suggestions onto how to fix this?
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:55 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
if you want to reslice the mask to be like a template volume, use "-rl" instead of "-at"
cheers Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
I do not have a transform file I can use so I was wondering if I can simply use the volume file I am trying to adapt the mask to as the transform file in the -at option. But looks like I cannot;
mri_convert -at MW_IIHC_aTAL.nii native.template.mgh native.orientation.mgh mri_convert.bin -at MW_IIHC_aTAL.nii native.template_.mgh native.orientation.mgh $Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $ reading from native.template.mgh... TR=1000.00, TE=0.00, TI=0.00, flip angle=0.00 i_ras = (-1, 0, -9.31323e-10) j_ras = (0, -1.49012e-08, -1) k_ras = (-1.62981e-09, 1, 1.49012e-08) INFO: Reading transformation from file MW_IIHC_aTAL.nii... Reading transform with LTAreadEx() INFO: This REGISTER_DAT transform is valid only for volumes between COR types with c_(r,a,s) = 0. regio_read_register(): No such file or directory Error reading inplaneres from MW_IIHC_aTAL.nii ltaReadRegisterDat: could not read MW_IIHC_aTAL.nii No such file or directory ERROR: Reading transform from file MW_IIHC_aTAL.nii
From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:50 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
sorry, I don't understand Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
Thank you!
Then I guess I would use the volume as the transform file to convert my mask.
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:41 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
ok, but your mri_mask command line has the string "%s" in it, which is not correct. You need to specify an actual file name. I also think you are better off using mri_convert -at <transform file name> .... to map the mask into the right coordinate system so that you can then view it in freeview to make sure it is correct
cheers Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
The mask in volume format was created using a docker image and it works well both with my freesurfer origin and native volume files; the one that it doesn't align with is the volume file I am trying to adapt to/from a different software. The command line I used for transforming is this;
mri_vol2vol --mov native.template_areas.mgh --targ MW_IIHC_aTAL.nii --regheader --o template.mgz --no-save-reg
Best, Idil
From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:14 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
Hi Idil
how did you create the mask and the transform? Also, you can't specify "%s" on the command line - you need an actual name of a transform file.
cheers Bruce
On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
Hello freesurfer experts,
A volume file I want to save as a mask(the orange/red shaded areas in the picture) on top of my volume file does not align as seen in the picture. I have used mri_vol2vol to align the mask to my native volume but apparently it did not work out. I am trying to correct this by using mri_mask now; I tried to use the option -xform %s which apparently applies the LTA transform to align mask to input volume, but now I get this error;
> lab@lab-ThinkStation-E31:~/Desktop/freesurfer/subjects/sub-01_MW/mri$
mri_mask -xform %s MW_IIHC_aTAL.nii native.areas_MW_aTAL.nii MW_aTAl_masked.nii transform file name is %s WARNING: hdr.dim[4] = 0 (nframes), setting to 1 niiRead(): NIFTI_UNITS_UNKNOWN, assuming mm DoAbs = 0 Apply the given LTA xfrom to the mask volume Reading transform ... ltaReadFile(%s): can't open file No such file or directory mri_mask.bin: could not read transform file %s No such file or directory
I would deeply appreciate if someone could help me sort out this mess.
Thank you all! Best, Idil
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
sorry, I still don't understand what it is you are trying to do. What are you trying to mask out? What is the source of the mask? Is the target of the mask a FreeSurfer volume? On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
I looked at their orientation differences using mri_info and used this command; mri_convert --in_orientation LIA --out_orientation AIL native.template.mgh native.corrected.nii But still there is an alignment problem. Looks like the xform info differs so can I use the mri_mask command with specifying the xform option?
This info is for the mask volume I want to use; type: MGH dimensions: 256 x 256 x 256 voxel sizes: 1.000000, 1.000000, 1.000000 type: FLOAT (3) fov: 256.000 dof: 0 xstart: -128.0, xend: 128.0 ystart: -128.0, yend: 128.0 zstart: -128.0, zend: 128.0 TR: 1000.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degrees nframes: 1 PhEncDir: UNKNOWN FieldStrength: 0.000000 ras xform present xform info: x_r = -1.0000, y_r = 0.0000, z_r = -0.0000, c_r = 3.2153 : x_a = 0.0000, y_a = -0.0000, z_a = 1.0000, c_a = -10.8083 : x_s = -0.0000, y_s = -1.0000, z_s = 0.0000, c_s = -8.7367
talairach xfm : Orientation : LIA Primary Slice Direction: coronal
voxel to ras transform: -1.0000 0.0000 -0.0000 131.2153 0.0000 -0.0000 1.0000 -138.8083 -0.0000 -1.0000 0.0000 119.2633 0.0000 0.0000 0.0000 1.0000
voxel-to-ras determinant -1
ras to voxel transform: -1.0000 -0.0000 0.0000 131.2153 0.0000 0.0000 -1.0000 119.2633 0.0000 1.0000 -0.0000 138.8084 -0.0000 -0.0000 -0.0000 1.0000
This information is of the volume file I want to overlay the mask on;
Volume information for MW_IIHC_aTAL.nii type: nii dimensions: 256 x 256 x 256 voxel sizes: 1.000000, 1.000000, 1.000000 type: FLOAT (3) fov: 256.000 dof: 0 xstart: -128.0, xend: 128.0 ystart: -128.0, yend: 128.0 zstart: -128.0, zend: 128.0 TR: 0.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degrees nframes: 1 PhEncDir: UNKNOWN FieldStrength: 0.000000 ras xform present xform info: x_r = -0.0553, y_r = 0.0101, z_r = -0.9984, c_r = -3.7597 : x_a = 0.9863, y_a = 0.1563, z_a = -0.0530, c_a = 11.9244 : x_s = 0.1555, y_s = -0.9877, z_s = -0.0186, c_s = -9.5782 Orientation : AIL Primary Slice Direction: sagittal
voxel to ras transform: -0.0553 0.0101 -0.9984 129.8205 0.9863 0.1563 -0.0530 -127.5422 0.1555 -0.9877 -0.0186 99.3136 0.0000 0.0000 0.0000 1.0000
voxel-to-ras determinant 1
ras to voxel transform: -0.0553 0.9863 0.1555 117.5212 0.0101 0.1563 -0.9877 116.7140 -0.9984 -0.0530 -0.0186 124.7003 0.0000 0.0000 0.0000 1.0000
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Yagmur Ozdemir 19 [yozdemir19@amherst.edu] Sent: Thursday, August 17, 2017 7:07 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
Yes; sorry. The mask is created by an applied docker image which produced volume and surface files of the template in both the brain's native and freesurfer origin orientation. MW_IIHC_aTAL.nii is the brain file of the same subject I exported from another software-I am hoping to export the template eventually to use in there-. native.template.mgh is the template file produced by the docker; it is the red/orange areas in the picture I sent. native.orientation.mgh is just a random name I gave to the output file.
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 7:03 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
Hi Idil
you need to give us much more information to be able to help you. How did you create the mask? Why volume to you expect it to be in register with? What are the volumes MW_IIHC_aTAL.nii native.template.mgh and native.orientation.mgh ?
Bruce
On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
It seems to be in the right orientation now but there is still an alignment problem; the mask is too far off from the brain. Sorry to be constantly asking questions; but do you have any suggestions onto how to fix this?
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:55 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
if you want to reslice the mask to be like a template volume, use "-rl" instead of "-at"
cheers Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
I do not have a transform file I can use so I was wondering if I can simply use the volume file I am trying to adapt the mask to as the transform file in the -at option. But looks like I cannot;
mri_convert -at MW_IIHC_aTAL.nii native.template.mgh native.orientation.mgh mri_convert.bin -at MW_IIHC_aTAL.nii native.template_.mgh native.orientation.mgh $Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $ reading from native.template.mgh... TR=1000.00, TE=0.00, TI=0.00, flip angle=0.00 i_ras = (-1, 0, -9.31323e-10) j_ras = (0, -1.49012e-08, -1) k_ras = (-1.62981e-09, 1, 1.49012e-08) INFO: Reading transformation from file MW_IIHC_aTAL.nii... Reading transform with LTAreadEx() INFO: This REGISTER_DAT transform is valid only for volumes between COR types with c_(r,a,s) = 0. regio_read_register(): No such file or directory Error reading inplaneres from MW_IIHC_aTAL.nii ltaReadRegisterDat: could not read MW_IIHC_aTAL.nii No such file or directory ERROR: Reading transform from file MW_IIHC_aTAL.nii
From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:50 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
sorry, I don't understand Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
Thank you!
Then I guess I would use the volume as the transform file to convert my mask.
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:41 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
ok, but your mri_mask command line has the string "%s" in it, which is not correct. You need to specify an actual file name. I also think you are better off using mri_convert -at <transform file name> .... to map the mask into the right coordinate system so that you can then view it in freeview to make sure it is correct
cheers Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
The mask in volume format was created using a docker image and it works well both with my freesurfer origin and native volume files; the one that it doesn't align with is the volume file I am trying to adapt to/from a different software. The command line I used for transforming is this;
mri_vol2vol --mov native.template_areas.mgh --targ MW_IIHC_aTAL.nii --regheader --o template.mgz --no-save-reg
Best, Idil
From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:14 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
Hi Idil
how did you create the mask and the transform? Also, you can't specify "%s" on the command line - you need an actual name of a transform file.
cheers Bruce
On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
Hello freesurfer experts,
A volume file I want to save as a mask(the orange/red shaded areas in the picture) on top of my volume file does not align as seen in the picture. I have used mri_vol2vol to align the mask to my native volume but apparently it did not work out. I am trying to correct this by using mri_mask now; I tried to use the option -xform %s which apparently applies the LTA transform to align mask to input volume, but now I get this error;
>> lab@lab-ThinkStation-E31:~/Desktop/freesurfer/subjects/sub-01_MW/mri$ mri_mask -xform %s MW_IIHC_aTAL.nii native.areas_MW_aTAL.nii MW_aTAl_masked.nii transform file name is %s WARNING: hdr.dim[4] = 0 (nframes), setting to 1 niiRead(): NIFTI_UNITS_UNKNOWN, assuming mm DoAbs = 0 Apply the given LTA xfrom to the mask volume Reading transform ... ltaReadFile(%s): can't open file No such file or directory mri_mask.bin: could not read transform file %s No such file or directory
I would deeply appreciate if someone could help me sort out this mess.
Thank you all! Best, Idil
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
I am probably mixing up the terminology--sorry about that. There is a volume overlay/mask in .mgz format that I am trying to export out and use on top of my MW_IIHC_aTAL.nii file that was created in this other software I want to use in. The mask/volume overlay was created by using a docker image so I did not process any fMRI data to create that in freesurfer. The target of the mask, MW_IIHC_aTAL.nii is not a freesurfer volume.
The volume overlay/mask is native.template.mgh; in the previous email exchanges you can see that I previously used mri_convert to change its orientation from LIA to AIL which the target file is in, but this file format did not help me after using the regdat2xfm command as described below.(It did not align properly, I attached a photo of that in this email)
Lastly, I have been trying to create an xfm file to use it with mri_convert <-at option>. I realized I can manually do it in tksurfer2 with this command; tkregister2 --targ MW_IIHC_aTAL.nii --mov native.template.nii --regheaders --reg reg.dat --xfmout reg.xfm but it wouldn't be quite accurate. I am also trying to use command regdat2xfm but the command line gives a segmentation fault error if I do not use the template that has corrected orientation. But again the orientation-corrected one still does not produce a good result. (regdat2xfm /home/lab/Desktop/freesurfer/subjects/sub-01_MW/mri/native.template.mgh /home/lab/Desktop/freesurfer/subjects/sub-01_MW/mri/MW_IIHC_aTAL.mgh reg1.dat reg1.xfm Segmentation fault (core dumped))
Sorry I sort of am dumping the whole situation and occupying the support email group. I deeply appreciate the help.
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 9:16 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
sorry, I still don't understand what it is you are trying to do. What are you trying to mask out? What is the source of the mask? Is the target of the mask a FreeSurfer volume? On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
I looked at their orientation differences using mri_info and used this command; mri_convert --in_orientation LIA --out_orientation AIL native.template.mgh native.corrected.nii But still there is an alignment problem. Looks like the xform info differs so can I use the mri_mask command with specifying the xform option?
This info is for the mask volume I want to use; type: MGH dimensions: 256 x 256 x 256 voxel sizes: 1.000000, 1.000000, 1.000000 type: FLOAT (3) fov: 256.000 dof: 0 xstart: -128.0, xend: 128.0 ystart: -128.0, yend: 128.0 zstart: -128.0, zend: 128.0 TR: 1000.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degrees nframes: 1 PhEncDir: UNKNOWN FieldStrength: 0.000000 ras xform present xform info: x_r = -1.0000, y_r = 0.0000, z_r = -0.0000, c_r = 3.2153 : x_a = 0.0000, y_a = -0.0000, z_a = 1.0000, c_a = -10.8083 : x_s = -0.0000, y_s = -1.0000, z_s = 0.0000, c_s = -8.7367
talairach xfm : Orientation : LIA Primary Slice Direction: coronal
voxel to ras transform: -1.0000 0.0000 -0.0000 131.2153 0.0000 -0.0000 1.0000 -138.8083 -0.0000 -1.0000 0.0000 119.2633 0.0000 0.0000 0.0000 1.0000
voxel-to-ras determinant -1
ras to voxel transform: -1.0000 -0.0000 0.0000 131.2153 0.0000 0.0000 -1.0000 119.2633 0.0000 1.0000 -0.0000 138.8084 -0.0000 -0.0000 -0.0000 1.0000
This information is of the volume file I want to overlay the mask on;
Volume information for MW_IIHC_aTAL.nii type: nii dimensions: 256 x 256 x 256 voxel sizes: 1.000000, 1.000000, 1.000000 type: FLOAT (3) fov: 256.000 dof: 0 xstart: -128.0, xend: 128.0 ystart: -128.0, yend: 128.0 zstart: -128.0, zend: 128.0 TR: 0.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degrees nframes: 1 PhEncDir: UNKNOWN FieldStrength: 0.000000 ras xform present xform info: x_r = -0.0553, y_r = 0.0101, z_r = -0.9984, c_r = -3.7597 : x_a = 0.9863, y_a = 0.1563, z_a = -0.0530, c_a = 11.9244 : x_s = 0.1555, y_s = -0.9877, z_s = -0.0186, c_s = -9.5782 Orientation : AIL Primary Slice Direction: sagittal
voxel to ras transform: -0.0553 0.0101 -0.9984 129.8205 0.9863 0.1563 -0.0530 -127.5422 0.1555 -0.9877 -0.0186 99.3136 0.0000 0.0000 0.0000 1.0000
voxel-to-ras determinant 1
ras to voxel transform: -0.0553 0.9863 0.1555 117.5212 0.0101 0.1563 -0.9877 116.7140 -0.9984 -0.0530 -0.0186 124.7003 0.0000 0.0000 0.0000 1.0000
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Yagmur Ozdemir 19 [yozdemir19@amherst.edu] Sent: Thursday, August 17, 2017 7:07 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
Yes; sorry. The mask is created by an applied docker image which produced volume and surface files of the template in both the brain's native and freesurfer origin orientation. MW_IIHC_aTAL.nii is the brain file of the same subject I exported from another software-I am hoping to export the template eventually to use in there-. native.template.mgh is the template file produced by the docker; it is the red/orange areas in the picture I sent. native.orientation.mgh is just a random name I gave to the output file.
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 7:03 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
Hi Idil
you need to give us much more information to be able to help you. How did you create the mask? Why volume to you expect it to be in register with? What are the volumes MW_IIHC_aTAL.nii native.template.mgh and native.orientation.mgh ?
Bruce
On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
It seems to be in the right orientation now but there is still an alignment problem; the mask is too far off from the brain. Sorry to be constantly asking questions; but do you have any suggestions onto how to fix this?
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:55 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
if you want to reslice the mask to be like a template volume, use "-rl" instead of "-at"
cheers Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
I do not have a transform file I can use so I was wondering if I can simply use the volume file I am trying to adapt the mask to as the transform file in the -at option. But looks like I cannot;
mri_convert -at MW_IIHC_aTAL.nii native.template.mgh native.orientation.mgh mri_convert.bin -at MW_IIHC_aTAL.nii native.template_.mgh native.orientation.mgh $Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $ reading from native.template.mgh... TR=1000.00, TE=0.00, TI=0.00, flip angle=0.00 i_ras = (-1, 0, -9.31323e-10) j_ras = (0, -1.49012e-08, -1) k_ras = (-1.62981e-09, 1, 1.49012e-08) INFO: Reading transformation from file MW_IIHC_aTAL.nii... Reading transform with LTAreadEx() INFO: This REGISTER_DAT transform is valid only for volumes between COR types with c_(r,a,s) = 0. regio_read_register(): No such file or directory Error reading inplaneres from MW_IIHC_aTAL.nii ltaReadRegisterDat: could not read MW_IIHC_aTAL.nii No such file or directory ERROR: Reading transform from file MW_IIHC_aTAL.nii
From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:50 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
sorry, I don't understand Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
Thank you!
Then I guess I would use the volume as the transform file to convert my mask.
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:41 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
ok, but your mri_mask command line has the string "%s" in it, which is not correct. You need to specify an actual file name. I also think you are better off using mri_convert -at <transform file name> .... to map the mask into the right coordinate system so that you can then view it in freeview to make sure it is correct
cheers Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
The mask in volume format was created using a docker image and it works well both with my freesurfer origin and native volume files; the one that it doesn't align with is the volume file I am trying to adapt to/from a different software. The command line I used for transforming is this;
mri_vol2vol --mov native.template_areas.mgh --targ MW_IIHC_aTAL.nii --regheader --o template.mgz --no-save-reg
Best, Idil
From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:14 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
Hi Idil
how did you create the mask and the transform? Also, you can't specify "%s" on the command line - you need an actual name of a transform file.
cheers Bruce
On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
Hello freesurfer experts,
A volume file I want to save as a mask(the orange/red shaded areas in the picture) on top of my volume file does not align as seen in the picture. I have used mri_vol2vol to align the mask to my native volume but apparently it did not work out. I am trying to correct this by using mri_mask now; I tried to use the option -xform %s which apparently applies the LTA transform to align mask to input volume, but now I get this error;
>> lab@lab-ThinkStation-E31:~/Desktop/freesurfer/subjects/sub-01_MW/mri$ mri_mask -xform %s MW_IIHC_aTAL.nii native.areas_MW_aTAL.nii MW_aTAl_masked.nii transform file name is %s WARNING: hdr.dim[4] = 0 (nframes), setting to 1 niiRead(): NIFTI_UNITS_UNKNOWN, assuming mm DoAbs = 0 Apply the given LTA xfrom to the mask volume Reading transform ... ltaReadFile(%s): can't open file No such file or directory mri_mask.bin: could not read transform file %s No such file or directory
I would deeply appreciate if someone could help me sort out this mess.
Thank you all! Best, Idil
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
I'm coming into this a little late, but it seems very complicated. If understand correctly, you have a volume created in another software package that you want to map into the freesurfer space. Is that right? Do you want it in the "native" space of the anatomical or the "conformed" space?
On 08/17/2017 02:56 PM, Yagmur Ozdemir 19 wrote:
I am probably mixing up the terminology--sorry about that. There is a volume overlay/mask in .mgz format that I am trying to export out and use on top of my MW_IIHC_aTAL.nii file that was created in this other software I want to use in. The mask/volume overlay was created by using a docker image so I did not process any fMRI data to create that in freesurfer. The target of the mask, MW_IIHC_aTAL.nii is not a freesurfer volume.
The volume overlay/mask is native.template.mgh; in the previous email exchanges you can see that I previously used mri_convert to change its orientation from LIA to AIL which the target file is in, but this file format did not help me after using the regdat2xfm command as described below.(It did not align properly, I attached a photo of that in this email)
Lastly, I have been trying to create an xfm file to use it with mri_convert <-at option>. I realized I can manually do it in tksurfer2 with this command; tkregister2 --targ MW_IIHC_aTAL.nii --mov native.template.nii --regheaders --reg reg.dat --xfmout reg.xfm but it wouldn't be quite accurate. I am also trying to use command regdat2xfm but the command line gives a segmentation fault error if I do not use the template that has corrected orientation. But again the orientation-corrected one still does not produce a good result. (regdat2xfm /home/lab/Desktop/freesurfer/subjects/sub-01_MW/mri/native.template.mgh /home/lab/Desktop/freesurfer/subjects/sub-01_MW/mri/MW_IIHC_aTAL.mgh reg1.dat reg1.xfm Segmentation fault (core dumped))
Sorry I sort of am dumping the whole situation and occupying the support email group. I deeply appreciate the help.
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 9:16 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
sorry, I still don't understand what it is you are trying to do. What are you trying to mask out? What is the source of the mask? Is the target of the mask a FreeSurfer volume? On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
I looked at their orientation differences using mri_info and used this command; mri_convert --in_orientation LIA --out_orientation AIL native.template.mgh native.corrected.nii But still there is an alignment problem. Looks like the xform info differs so can I use the mri_mask command with specifying the xform option?
This info is for the mask volume I want to use; type: MGH dimensions: 256 x 256 x 256 voxel sizes: 1.000000, 1.000000, 1.000000 type: FLOAT (3) fov: 256.000 dof: 0 xstart: -128.0, xend: 128.0 ystart: -128.0, yend: 128.0 zstart: -128.0, zend: 128.0 TR: 1000.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degrees nframes: 1 PhEncDir: UNKNOWN FieldStrength: 0.000000 ras xform present xform info: x_r = -1.0000, y_r = 0.0000, z_r = -0.0000, c_r = 3.2153 : x_a = 0.0000, y_a = -0.0000, z_a = 1.0000, c_a = -10.8083 : x_s = -0.0000, y_s = -1.0000, z_s = 0.0000, c_s = -8.7367
talairach xfm : Orientation : LIA Primary Slice Direction: coronal
voxel to ras transform: -1.0000 0.0000 -0.0000 131.2153 0.0000 -0.0000 1.0000 -138.8083 -0.0000 -1.0000 0.0000 119.2633 0.0000 0.0000 0.0000 1.0000
voxel-to-ras determinant -1
ras to voxel transform: -1.0000 -0.0000 0.0000 131.2153 0.0000 0.0000 -1.0000 119.2633 0.0000 1.0000 -0.0000 138.8084 -0.0000 -0.0000 -0.0000 1.0000
This information is of the volume file I want to overlay the mask on;
Volume information for MW_IIHC_aTAL.nii type: nii dimensions: 256 x 256 x 256 voxel sizes: 1.000000, 1.000000, 1.000000 type: FLOAT (3) fov: 256.000 dof: 0 xstart: -128.0, xend: 128.0 ystart: -128.0, yend: 128.0 zstart: -128.0, zend: 128.0 TR: 0.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degrees nframes: 1 PhEncDir: UNKNOWN FieldStrength: 0.000000 ras xform present xform info: x_r = -0.0553, y_r = 0.0101, z_r = -0.9984, c_r = -3.7597 : x_a = 0.9863, y_a = 0.1563, z_a = -0.0530, c_a = 11.9244 : x_s = 0.1555, y_s = -0.9877, z_s = -0.0186, c_s = -9.5782 Orientation : AIL Primary Slice Direction: sagittal
voxel to ras transform: -0.0553 0.0101 -0.9984 129.8205 0.9863 0.1563 -0.0530 -127.5422 0.1555 -0.9877 -0.0186 99.3136 0.0000 0.0000 0.0000 1.0000
voxel-to-ras determinant 1
ras to voxel transform: -0.0553 0.9863 0.1555 117.5212 0.0101 0.1563 -0.9877 116.7140 -0.9984 -0.0530 -0.0186 124.7003 0.0000 0.0000 0.0000 1.0000
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Yagmur Ozdemir 19 [yozdemir19@amherst.edu] Sent: Thursday, August 17, 2017 7:07 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
Yes; sorry. The mask is created by an applied docker image which produced volume and surface files of the template in both the brain's native and freesurfer origin orientation. MW_IIHC_aTAL.nii is the brain file of the same subject I exported from another software-I am hoping to export the template eventually to use in there-. native.template.mgh is the template file produced by the docker; it is the red/orange areas in the picture I sent. native.orientation.mgh is just a random name I gave to the output file.
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 7:03 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
Hi Idil
you need to give us much more information to be able to help you. How did you create the mask? Why volume to you expect it to be in register with? What are the volumes MW_IIHC_aTAL.nii native.template.mgh and native.orientation.mgh ?
Bruce
On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
It seems to be in the right orientation now but there is still an alignment problem; the mask is too far off from the brain. Sorry to be constantly asking questions; but do you have any suggestions onto how to fix this?
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:55 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
if you want to reslice the mask to be like a template volume, use "-rl" instead of "-at"
cheers Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
I do not have a transform file I can use so I was wondering if I can simply use the volume file I am trying to adapt the mask to as the transform file in the -at option. But looks like I cannot;
mri_convert -at MW_IIHC_aTAL.nii native.template.mgh native.orientation.mgh mri_convert.bin -at MW_IIHC_aTAL.nii native.template_.mgh native.orientation.mgh $Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $ reading from native.template.mgh... TR=1000.00, TE=0.00, TI=0.00, flip angle=0.00 i_ras = (-1, 0, -9.31323e-10) j_ras = (0, -1.49012e-08, -1) k_ras = (-1.62981e-09, 1, 1.49012e-08) INFO: Reading transformation from file MW_IIHC_aTAL.nii... Reading transform with LTAreadEx() INFO: This REGISTER_DAT transform is valid only for volumes between COR types with c_(r,a,s) = 0. regio_read_register(): No such file or directory Error reading inplaneres from MW_IIHC_aTAL.nii ltaReadRegisterDat: could not read MW_IIHC_aTAL.nii No such file or directory ERROR: Reading transform from file MW_IIHC_aTAL.nii
From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:50 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
sorry, I don't understand Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
Thank you!
Then I guess I would use the volume as the transform file to convert my mask.
Best, Idil ________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:41 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
ok, but your mri_mask command line has the string "%s" in it, which is not correct. You need to specify an actual file name. I also think you are better off using mri_convert -at <transform file name> .... to map the mask into the right coordinate system so that you can then view it in freeview to make sure it is correct
cheers Bruce On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
The mask in volume format was created using a docker image and it works well both with my freesurfer origin and native volume files; the one that it doesn't align with is the volume file I am trying to adapt to/from a different software. The command line I used for transforming is this;
mri_vol2vol --mov native.template_areas.mgh --targ MW_IIHC_aTAL.nii --regheader --o template.mgz --no-save-reg
Best, Idil
From: freesurfer-bounces@nmr.mgh.harvard.edu [freesurfer-bounces@nmr.mgh.harvard.edu] on behalf of Bruce Fischl [fischl@nmr.mgh.harvard.edu] Sent: Thursday, August 17, 2017 6:14 PM To: Freesurfer support list Subject: Re: [Freesurfer] mask alignment problem/mri_mask
Hi Idil
how did you create the mask and the transform? Also, you can't specify "%s" on the command line - you need an actual name of a transform file.
cheers Bruce
On Thu, 17 Aug 2017, Yagmur Ozdemir 19 wrote:
> Hello freesurfer experts, > > A volume file I want to save as a mask(the orange/red shaded areas in the > picture) on top of my volume file does not align as seen in the picture. I > have used mri_vol2vol to align the mask to my native volume but apparently > it did not work out. I am trying to correct this by using mri_mask now; I > tried to use the option -xform %s which apparently applies the LTA transform > to align mask to input volume, but now I get this error; > >>> lab@lab-ThinkStation-E31:~/Desktop/freesurfer/subjects/sub-01_MW/mri$ > mri_mask -xform %s MW_IIHC_aTAL.nii native.areas_MW_aTAL.nii > MW_aTAl_masked.nii > transform file name is %s > WARNING: hdr.dim[4] = 0 (nframes), setting to 1 > niiRead(): NIFTI_UNITS_UNKNOWN, assuming mm > DoAbs = 0 > Apply the given LTA xfrom to the mask volume > Reading transform ... > ltaReadFile(%s): can't open file > No such file or directory > mri_mask.bin: could not read transform file %s > No such file or directory > > > I would deeply appreciate if someone could help me sort out this mess. > > Thank you all! > Best, > Idil > > _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu