Hi,
We were running free-surfer (freesurfer-Linux-rh9-dev20051003-full.tar.gz) on RedHat 9 and encountered a problem with the command mri_mask. It is not at all working.
Here is what we entered as input: mri_mask input.mgz mask.mgz output.mgz
No matter what we put as the mask, the input.mgz and output.mgz are always identical. Is there a bug with this command? (The command says "writing masked volume to output.mgz..." then about 10 seconds later it's done - although nothing is done).
Thanks.
--Yuhong ============================================================================= Yuhong Jiang yuhong@MIT.EDU 617-876-2054 http://web.mit.edu/yuhong/www =============================================================================
what is in the mask.mgz volume?
On Fri, 6 Jan 2006, Yuhong Jiang wrote:
Hi,
We were running free-surfer (freesurfer-Linux-rh9-dev20051003-full.tar.gz) on RedHat 9 and encountered a problem with the command mri_mask. It is not at all working.
Here is what we entered as input: mri_mask input.mgz mask.mgz output.mgz
No matter what we put as the mask, the input.mgz and output.mgz are always identical. Is there a bug with this command? (The command says "writing masked volume to output.mgz..." then about 10 seconds later it's done - although nothing is done).
Thanks.
--Yuhong
Yuhong Jiang yuhong@MIT.EDU 617-876-2054 http://web.mit.edu/yuhong/www ============================================================================= _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Hi Bruce,
The exact input is:
mri_mask T1.mgz brain.mgz brain.mgz
This command was invoked by "recon-all -subjid subject -normalization2", which is part of "recon-all -subjid subject -autorecon2". Because of the bug, after this command, the manual edited brain.mgz went back to pre-manual editing state.
It appears that by adding a threshold (mri_mask -T 20 T1.mgz brain.mgz brain.mgz) the mask is properly executed. However, this does mean that one cannot run autorecon2 or normalization2, which calls for mri_mask without specifying a threshold. Perhaps someone should fix this command (as well as autorecon2 and normalization2)??
--Yuhong
============================================================================= Yuhong Jiang yuhong@MIT.EDU 617-876-2054 http://web.mit.edu/yuhong/www =============================================================================
it sounds like there's something that went wrong with the skullstripping if you have to use a threshold of 20. Have you looked at brain.mgz immediately after skullstripping? The background voxels should be 0.
Hi Bruce,
The exact input is:
mri_mask T1.mgz brain.mgz brain.mgz
This command was invoked by "recon-all -subjid subject -normalization2", which is part of "recon-all -subjid subject -autorecon2". Because of the bug, after this command, the manual edited brain.mgz went back to pre-manual editing state.
It appears that by adding a threshold (mri_mask -T 20 T1.mgz brain.mgz brain.mgz) the mask is properly executed. However, this does mean that one cannot run autorecon2 or normalization2, which calls for mri_mask without specifying a threshold. Perhaps someone should fix this command (as well as autorecon2 and normalization2)??
--Yuhong
============================================================================= Yuhong Jiang yuhong@MIT.EDU 617-876-2054 http://web.mit.edu/yuhong/www =============================================================================
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Hi Doug,
For mri_mask's threshold,
"mri_mask -T 1 T1.mgz brain.mgz brain.mgz" works, but "mri_mask -T 0 T1.mgz brain.mgz brain.mgz" does not work, and "mri_mask T1.mgz brain.mgz brain.mgz" does not work either.
So one should specify the threshold to be at least 1. The default used by -autorecon2 (or normalization2) is not sufficient.
--Yuhong ============================================================================= Yuhong Jiang yuhong@MIT.EDU 617-876-2054 http://web.mit.edu/yuhong/www =============================================================================
From: greve@nmr.mgh.harvard.edu greve@nmr.mgh.harvard.edu To: Yuhong Jiang yuhong@mit.edu Cc: freesurfer@nmr.mgh.harvard.edu, fischl@nrm.mgh.harvard.edu Date: Jan 7, 2006 2:43 PM Subject: Re: [Freesurfer] Re: mri_mask bug Reply | Reply to all | Forward | Print | Add sender to Contacts list | Delete this message | Report phishing | Show original | Message text garbled?
it sounds like there's something that went wrong with the skullstripping if you have to use a threshold of 20. Have you looked at brain.mgz immediately after skullstripping? The background voxels should be 0.
On Fri, 6 Jan 2006, Yuhong Jiang wrote:
Hi Bruce,
The exact input is:
mri_mask T1.mgz brain.mgz brain.mgz
This command was invoked by "recon-all -subjid subject -normalization2", which is part of "recon-all -subjid subject -autorecon2". Because of the bug, after this command, the manual edited brain.mgz went back to pre-manual editing state.
It appears that by adding a threshold (mri_mask -T 20 T1.mgz brain.mgz brain.mgz) the mask is properly executed. However, this does mean that one cannot run autorecon2 or normalization2, which calls for mri_mask without specifying a threshold. Perhaps someone should fix this command (as well as autorecon2 and normalization2)??
--Yuhong
============================================================================= Yuhong Jiang yuhong@MIT.EDU 617-876-2054 http://web.mit.edu/yuhong/www =============================================================================
Hi Yuhong,
thanks for catching this - it is indeed a bug that we (meaning Doug :>) are fixing.
Bruce On Mon, 9 Jan 2006, Yuhong Jiang wrote:
Hi Doug,
For mri_mask's threshold,
"mri_mask -T 1 T1.mgz brain.mgz brain.mgz" works, but "mri_mask -T 0 T1.mgz brain.mgz brain.mgz" does not work, and "mri_mask T1.mgz brain.mgz brain.mgz" does not work either.
So one should specify the threshold to be at least 1. The default used by -autorecon2 (or normalization2) is not sufficient.
--Yuhong
Yuhong Jiang yuhong@MIT.EDU 617-876-2054 http://web.mit.edu/yuhong/www =============================================================================
From: greve@nmr.mgh.harvard.edu greve@nmr.mgh.harvard.edu To: Yuhong Jiang yuhong@mit.edu Cc: freesurfer@nmr.mgh.harvard.edu, fischl@nrm.mgh.harvard.edu Date: Jan 7, 2006 2:43 PM Subject: Re: [Freesurfer] Re: mri_mask bug Reply | Reply to all | Forward | Print | Add sender to Contacts list | Delete this message | Report phishing | Show original | Message text garbled?
it sounds like there's something that went wrong with the skullstripping if you have to use a threshold of 20. Have you looked at brain.mgz immediately after skullstripping? The background voxels should be 0.
On Fri, 6 Jan 2006, Yuhong Jiang wrote:
Hi Bruce,
The exact input is:
mri_mask T1.mgz brain.mgz brain.mgz
This command was invoked by "recon-all -subjid subject -normalization2", which is part of "recon-all -subjid subject -autorecon2". Because of the bug, after this command, the manual edited brain.mgz went back to pre-manual editing state.
It appears that by adding a threshold (mri_mask -T 20 T1.mgz brain.mgz brain.mgz) the mask is properly executed. However, this does mean that one cannot run autorecon2 or normalization2, which calls for mri_mask without specifying a threshold. Perhaps someone should fix this command (as well as autorecon2 and normalization2)??
--Yuhong
============================================================================= Yuhong Jiang yuhong@MIT.EDU 617-876-2054 http://web.mit.edu/yuhong/www =============================================================================
I've made the fix (added -T 1 to the invokations of mri_mask). Locally at the NMR center, it will be live tomorrow. Not sure what the best way to get the change to you. I can post the new script, but I don't know what version you are using. A new version might not be compatible with what you've done already. You can also edit your version to add -T 1.
doug
Bruce Fischl wrote:
Hi Yuhong,
thanks for catching this - it is indeed a bug that we (meaning Doug :>) are fixing.
Bruce On Mon, 9 Jan 2006, Yuhong Jiang wrote:
Hi Doug,
For mri_mask's threshold,
"mri_mask -T 1 T1.mgz brain.mgz brain.mgz" works, but "mri_mask -T 0 T1.mgz brain.mgz brain.mgz" does not work, and "mri_mask T1.mgz brain.mgz brain.mgz" does not work either.
So one should specify the threshold to be at least 1. The default used by -autorecon2 (or normalization2) is not sufficient.
--Yuhong
Yuhong Jiang yuhong@MIT.EDU 617-876-2054 http://web.mit.edu/yuhong/www=============================================================================
From: greve@nmr.mgh.harvard.edu greve@nmr.mgh.harvard.edu To: Yuhong Jiang yuhong@mit.edu Cc: freesurfer@nmr.mgh.harvard.edu, fischl@nrm.mgh.harvard.edu Date: Jan 7, 2006 2:43 PM Subject: Re: [Freesurfer] Re: mri_mask bug Reply | Reply to all | Forward | Print | Add sender to Contacts list | Delete this message | Report phishing | Show original | Message text garbled?
it sounds like there's something that went wrong with the skullstripping if you have to use a threshold of 20. Have you looked at brain.mgz immediately after skullstripping? The background voxels should be 0.
On Fri, 6 Jan 2006, Yuhong Jiang wrote:
Hi Bruce,
The exact input is:
mri_mask T1.mgz brain.mgz brain.mgz
This command was invoked by "recon-all -subjid subject -normalization2", which is part of "recon-all -subjid subject -autorecon2". Because of the bug, after this command, the manual edited brain.mgz went back to pre-manual editing state.
It appears that by adding a threshold (mri_mask -T 20 T1.mgz brain.mgz brain.mgz) the mask is properly executed. However, this does mean that one cannot run autorecon2 or normalization2, which calls for mri_mask without specifying a threshold. Perhaps someone should fix this command (as well as autorecon2 and normalization2)??
--Yuhong
=============================================================================
Yuhong Jiang yuhong@MIT.EDU 617-876-2054 http://web.mit.edu/yuhong/www=============================================================================
Hi,
We are running free-surfer dev 2005-10-03 version
I ran "recon-all -subjid [oldfolder] -autorecon1", and subsequently I changed the folder name to [newfolder], and ran "recon-all -subjid [newfolder] -autorecon2".
After that, when I used "tksurfer [newfolder] lh inflated", a warning was given. It says:
WARNING: can't find the talairach xform '/usr/local/freesurfer/subjects/oldfolder/transforms/talairach.xfm' WARNING: transform is not loaded into mri
Could you please let me know why tksurfer is looking for the oldfolder's talairach.xfm? Is there a place that we can change so that it will be looking for the newfolder? Thanks.
--Yuhong
============================================================================= Yuhong Jiang yuhong@MIT.EDU 617-876-2054 http://web.mit.edu/yuhong/www =============================================================================
The full path to the talairach.xfm is saved as part of the mgz volume, which is then accessed when surfaces are loaded. When you change the name of the directory, it still looks in the old directory and does not find what it's looking for. This only creates a problem if you want to get talairach coords. To fix it, you can run something like
cd newfolder/mri mri_add_xform_to_header -c /usr/local/freesurfer/subjects/newfolder/mri/transforms/talairach.xfm \ orig.mgz orig.mgz
You should probably do this for each volume in mri/
doug
Yuhong Jiang wrote:
Hi,
We are running free-surfer dev 2005-10-03 version
I ran "recon-all -subjid [oldfolder] -autorecon1", and subsequently I changed the folder name to [newfolder], and ran "recon-all -subjid [newfolder] -autorecon2".
After that, when I used "tksurfer [newfolder] lh inflated", a warning was given. It says:
WARNING: can't find the talairach xform '/usr/local/freesurfer/subjects/oldfolder/transforms/talairach.xfm' WARNING: transform is not loaded into mri
Could you please let me know why tksurfer is looking for the oldfolder's talairach.xfm? Is there a place that we can change so that it will be looking for the newfolder? Thanks.
--Yuhong
=============================================================================
Yuhong Jiang yuhong@MIT.EDU 617-876-2054 http://web.mit.edu/yuhong/www=============================================================================
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu