[Freesurfer] mri_mask output problem

2013-12-30 Thread Caspar M. Schwiedrzik
Hi Freesurfer Experts,
I am trying to apply a mask that I made with FSL's bet to a NIFTI file that
I got from someone else.
The mask looks fine, the NIFTI file is in float format, does not contain
NaNs or negative values, but the overall values are all pretty low (in the
40ies). When I try to apply the mask to the NIFTI file using mri_mask, the
output I get is essentially a copy of the mask (only zeros and ones). The
same happens if I use fslmaths.
Any advice would be very much appreciated.
Thanks, Caspar
___
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.


Re: [Freesurfer] mri_mask output problem

2013-12-30 Thread Douglas Greve


what is your command line and terminal output?


On 12/30/13 10:22 AM, Caspar M. Schwiedrzik wrote:

Hi Freesurfer Experts,
I am trying to apply a mask that I made with FSL's bet to a NIFTI file 
that I got from someone else.
The mask looks fine, the NIFTI file is in float format, does not 
contain NaNs or negative values, but the overall values are all pretty 
low (in the 40ies). When I try to apply the mask to the NIFTI file 
using mri_mask, the output I get is essentially a copy of the mask 
(only zeros and ones). The same happens if I use fslmaths.

Any advice would be very much appreciated.
Thanks, Caspar



___
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.


Re: [Freesurfer] mri_mask output problem

2013-12-30 Thread Caspar M. Schwiedrzik
Hi Doug,
this is the command line input:
mri_mask macaque_25_model-MNI.nii macaque_stripped_mask.nii.gz
macaque_stripped_final2.nii
this is the terminal output:
DoAbs = 0
Found 14652800 voxels in mask
Writing masked volume to macaque_stripped_final2.nii...done.
The same thing happens when I use nii.gz or mgz files.

Caspar



2013/12/30 Douglas Greve 

>
> what is your command line and terminal output?
>
>
>
> On 12/30/13 10:22 AM, Caspar M. Schwiedrzik wrote:
>
>   Hi Freesurfer Experts,
>  I am trying to apply a mask that I made with FSL's bet to a NIFTI file
> that I got from someone else.
>  The mask looks fine, the NIFTI file is in float format, does not contain
> NaNs or negative values, but the overall values are all pretty low (in the
> 40ies). When I try to apply the mask to the NIFTI file using mri_mask, the
> output I get is essentially a copy of the mask (only zeros and ones). The
> same happens if I use fslmaths.
>  Any advice would be very much appreciated.
>  Thanks, Caspar
>
>
>
> ___
> Freesurfer mailing 
> listfreesur...@nmr.mgh.harvard.eduhttps://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


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.


Re: [Freesurfer] mri_mask output problem

2013-12-30 Thread Douglas Greve
And macaque_25_model-MNI.nii is the non-binary image? And 
macaque_stripped_mask.nii.gz is the binary mask? If so, the command 
looks right to me.

doug

On 12/30/13 12:08 PM, Caspar M. Schwiedrzik wrote:

Hi Doug,
this is the command line input:
mri_mask macaque_25_model-MNI.nii macaque_stripped_mask.nii.gz 
macaque_stripped_final2.nii

this is the terminal output:
DoAbs = 0
Found 14652800 voxels in mask
Writing masked volume to macaque_stripped_final2.nii...done.
The same thing happens when I use nii.gz or mgz files.

Caspar



2013/12/30 Douglas Greve >



what is your command line and terminal output?



On 12/30/13 10:22 AM, Caspar M. Schwiedrzik wrote:

Hi Freesurfer Experts,
I am trying to apply a mask that I made with FSL's bet to a NIFTI
file that I got from someone else.
The mask looks fine, the NIFTI file is in float format, does not
contain NaNs or negative values, but the overall values are all
pretty low (in the 40ies). When I try to apply the mask to the
NIFTI file using mri_mask, the output I get is essentially a copy
of the mask (only zeros and ones). The same happens if I use
fslmaths.
Any advice would be very much appreciated.
Thanks, Caspar



___
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


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.


Re: [Freesurfer] mri_mask output problem

2013-12-30 Thread Caspar M. Schwiedrzik
Hi Doug,
that's correct.
I think the problem is perhaps that the original NIFTI file has a very
narrow range of values, between 43.7308 and 43.8476, to cover the whole
range of tissues in the image.
It is an average over several subjects, and before skull stripping, there
are hardly any zeros in the image.
Is there a way to rescale the file?
Thanks, Caspar




2013/12/30 Douglas Greve 

>  And macaque_25_model-MNI.nii is the non-binary image? And
> macaque_stripped_mask.nii.gz is the binary mask? If so, the command looks
> right to me.
> doug
>
>
> On 12/30/13 12:08 PM, Caspar M. Schwiedrzik wrote:
>
>  Hi Doug,
> this is the command line input:
> mri_mask macaque_25_model-MNI.nii macaque_stripped_mask.nii.gz
> macaque_stripped_final2.nii
> this is the terminal output:
> DoAbs = 0
> Found 14652800 voxels in mask
> Writing masked volume to macaque_stripped_final2.nii...done.
>  The same thing happens when I use nii.gz or mgz files.
>
>  Caspar
>
>
>
> 2013/12/30 Douglas Greve 
>
>>
>> what is your command line and terminal output?
>>
>>
>>
>> On 12/30/13 10:22 AM, Caspar M. Schwiedrzik wrote:
>>
>>Hi Freesurfer Experts,
>>  I am trying to apply a mask that I made with FSL's bet to a NIFTI file
>> that I got from someone else.
>>  The mask looks fine, the NIFTI file is in float format, does not contain
>> NaNs or negative values, but the overall values are all pretty low (in the
>> 40ies). When I try to apply the mask to the NIFTI file using mri_mask, the
>> output I get is essentially a copy of the mask (only zeros and ones). The
>> same happens if I use fslmaths.
>>  Any advice would be very much appreciated.
>>  Thanks, Caspar
>>
>>
>>
>>  ___
>> Freesurfer mailing 
>> listfreesur...@nmr.mgh.harvard.eduhttps://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


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.


Re: [Freesurfer] mri_mask output problem

2013-12-30 Thread Douglas Greve


That should not be a problem. Certainly it should not cause everything 
to go to 1s and 0s. What version of FS are you using? And you say the 
same thing happens with FSL? Try using mri_convert to convert the 
nonbinary image to another nifti file and see if you get 1s and 0s. If 
not, then try that file as input. You can also try fscalc, something like


fscalc input.nii mul mask.nii -o output.nii

should accomplish the same thing

doug




On 12/30/13 1:12 PM, Caspar M. Schwiedrzik wrote:

Hi Doug,
that's correct.
I think the problem is perhaps that the original NIFTI file has a very 
narrow range of values, between 43.7308 and 43.8476, to cover the 
whole range of tissues in the image.
It is an average over several subjects, and before skull stripping, 
there are hardly any zeros in the image.

Is there a way to rescale the file?
Thanks, Caspar




2013/12/30 Douglas Greve >


And macaque_25_model-MNI.nii is the non-binary image? And
macaque_stripped_mask.nii.gz is the binary mask? If so, the
command looks right to me.
doug


On 12/30/13 12:08 PM, Caspar M. Schwiedrzik wrote:

Hi Doug,
this is the command line input:
mri_mask macaque_25_model-MNI.nii macaque_stripped_mask.nii.gz
macaque_stripped_final2.nii
this is the terminal output:
DoAbs = 0
Found 14652800 voxels in mask
Writing masked volume to macaque_stripped_final2.nii...done.
The same thing happens when I use nii.gz or mgz files.

Caspar



2013/12/30 Douglas Greve mailto:gr...@nmr.mgh.harvard.edu>>


what is your command line and terminal output?



On 12/30/13 10:22 AM, Caspar M. Schwiedrzik wrote:

Hi Freesurfer Experts,
I am trying to apply a mask that I made with FSL's bet to a
NIFTI file that I got from someone else.
The mask looks fine, the NIFTI file is in float format, does
not contain NaNs or negative values, but the overall values
are all pretty low (in the 40ies). When I try to apply the
mask to the NIFTI file using mri_mask, the output I get is
essentially a copy of the mask (only zeros and ones). The
same happens if I use fslmaths.
Any advice would be very much appreciated.
Thanks, Caspar



___
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


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.


Re: [Freesurfer] mri_mask output problem

2013-12-30 Thread Caspar M. Schwiedrzik
Hi Doug,
thanks for your input. I turns out that there is some problem when
converting minc to NIFTI with float. I got a hold of the original minc file
and converted it to NIFTI with minc2nii using integer, and now the values
are in a reasonable range and the skull stripping works.
Thanks!
Caspar



2013/12/30 Douglas Greve 

>
> That should not be a problem. Certainly it should not cause everything to
> go to 1s and 0s. What version of FS are you using? And you say the same
> thing happens with FSL? Try using mri_convert to convert the nonbinary
> image to another nifti file and see if you get 1s and 0s. If not, then try
> that file as input. You can also try fscalc, something like
>
> fscalc input.nii mul mask.nii -o output.nii
>
> should accomplish the same thing
>
> doug
>
>
>
>
>
> On 12/30/13 1:12 PM, Caspar M. Schwiedrzik wrote:
>
>  Hi Doug,
> that's correct.
>  I think the problem is perhaps that the original NIFTI file has a very
> narrow range of values, between 43.7308 and 43.8476, to cover the whole
> range of tissues in the image.
> It is an average over several subjects, and before skull stripping, there
> are hardly any zeros in the image.
> Is there a way to rescale the file?
>  Thanks, Caspar
>
>
>
>
> 2013/12/30 Douglas Greve 
>
>>  And macaque_25_model-MNI.nii is the non-binary image? And
>> macaque_stripped_mask.nii.gz is the binary mask? If so, the command looks
>> right to me.
>> doug
>>
>>
>> On 12/30/13 12:08 PM, Caspar M. Schwiedrzik wrote:
>>
>>  Hi Doug,
>> this is the command line input:
>> mri_mask macaque_25_model-MNI.nii macaque_stripped_mask.nii.gz
>> macaque_stripped_final2.nii
>> this is the terminal output:
>> DoAbs = 0
>> Found 14652800 voxels in mask
>> Writing masked volume to macaque_stripped_final2.nii...done.
>>  The same thing happens when I use nii.gz or mgz files.
>>
>>  Caspar
>>
>>
>>
>> 2013/12/30 Douglas Greve 
>>
>>>
>>> what is your command line and terminal output?
>>>
>>>
>>>
>>> On 12/30/13 10:22 AM, Caspar M. Schwiedrzik wrote:
>>>
>>>Hi Freesurfer Experts,
>>>  I am trying to apply a mask that I made with FSL's bet to a NIFTI file
>>> that I got from someone else.
>>>  The mask looks fine, the NIFTI file is in float format, does not
>>> contain NaNs or negative values, but the overall values are all pretty low
>>> (in the 40ies). When I try to apply the mask to the NIFTI file using
>>> mri_mask, the output I get is essentially a copy of the mask (only zeros
>>> and ones). The same happens if I use fslmaths.
>>>  Any advice would be very much appreciated.
>>>  Thanks, Caspar
>>>
>>>
>>>
>>>  ___
>>> Freesurfer mailing 
>>> listfreesur...@nmr.mgh.harvard.eduhttps://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


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.