open-discussion > ROI and ghost mask output
Showing 1-4 of 4 posts
Display:
Results per page:
Jan 11, 2017  08:01 PM | Sebastian Hoefle
ROI and ghost mask output
Dear BIRN developers,

first of all, thanks a lot for providing the tools for the QA.

We have a minor issue for the fmri_phantom_qa.pl routine (included in bxh_xcede_tools-1.11.1-lsb30.x86_64). The routine works without any problems and produces the expected html report. However, we would like to have more information about the exact location of the ROI and ghost masks. Is it possible to have an output file for the internally created ROI and ghost mask (similar to the left figure of the attached file)? I had a look into the manual and found these informations:

For EPI sequences, this image plots the
"ghostiness" of the data. The ghost metric is
calculated for each volume by calculating a
dilated mask ("original mask") of the motion corrected,
detrended data, and shifting it by
N/2 voxels in the appropriate axis to create a
"ghost mask". The mean intensities of those
voxels in the original mask and not in the
ghost mask, and of voxels in the ghost mask
and not in the original mask are calculated.
The mean intensity of the top 10 percent
of ghost-only voxels ("meanBrightGhost")
is also calculated. The ghost values are
plotted as a percentage of the mean intensity
of non-ghost voxels. The dilated mask is
generated using the following sequence of
AFNI commands:
3dvolreg --prefix REG INPUT
3dDetrend --polort 2 --prefix
DETREND REG
3dTstat --mean --prefix MEAN REG
3dAutomask --q --dilate 4 --prefix
MASK MEAN

Based on these informations, I tried to reproduce the ghost mask (see right figure of the attached file), by shifting the dilated mask by N/2 voxels (half of the FOV). The resulting ghost mask has substantial overlap with the phantom for our dimensions (spherical phantom diameter: 165 mm ; FOV: 220 mm; Matrix: 64x64). Is this the expected location for the ghost mask or did I misunderstand something? Are there any alternatives or recommendations for creating/confirming the position of the ROI and ghost mask?

Best Regards

Sebastian Höfle
D'Or Institute for Research and Education (IDOR)
Phone/Fax: +55 21 3883 6000
e-mail: sebastian.hoefle@idor.org
http://www.idor.org
Jan 11, 2017  08:01 PM | Syam Gadde
RE: ROI and ghost mask output
I don't see your attached file, but it's OK for the "ghost mask" to overlap with the "real phantom" -- the voxels considered in calculation are only those that are in one mask and not in the other.  That results in "ghost-only" voxels, and "non-ghost-only" voxels.  I guess typically the two ROIs would look like an hourglass on its side and it's shifted counterpart.  So if your ROIs look like that, then you are probably doing the right thing.  You can look at the code in fmriqa_ghostiness.c if want details on how the metrics are calculated (once the original dilated mask is generated).
Jan 12, 2017  11:01 AM | Sebastian Hoefle
RE: ROI and ghost mask output
Dear Syam Gadde,

thanks for your quick and helpful answer. 

So, with the exclusion of the dilated mask from the shifted ghost mask, everything should be fine. I have two wo more questions:

1 - Where can I get the source code? I downloaded the tools from the NITRC site and have not found any source code in this package:
http://www.nitrc.org/frs/download.php/73...

2 - Is it possible to save an output of the roi and ghost mask (like on the left side of the attached figure)?

Best Regards

Sebastian Höfle
D'Or Institute for Research and Education (IDOR)
Phone/Fax: +55 21 3883 6000
e-mail: sebastian.hoefle@idor.org
http://www.idor.org

The D'Or Institute is a not for profit research and educational organization partially supported by independent grants from the Rede D'Or health organization.
Attachment: roi_ghost_mask.png
Jan 12, 2017  02:01 PM | Syam Gadde
RE: ROI and ghost mask output
You can download the source code using svn using the instructions here:

http://www.nitrc.org/scm/?group_id=200

If you wish to submit modifications to save the ghost mask, I will be happy to consider them!  Thanks!