On 1/27/15 1:56 PM, Ben Eliezer, Noam wrote:
The maps were generated by Siemens scanner, fitting a multi-spin-echo
protocol.
I see your point, though. The values should not range between 0 to
4000. The latter 4000 value is the background out-of-brain map value.
But when looking at the T2_siemens_reg.mgz, overlaid on the
aparc+aseg.mgz in freeview, the white matter (segment #2) seems well
within the brain, and does not include any parts that have value = 0
or 4000.
_Question 1_: is it possible to look at the actual set of values that
are used to calculate these mean and STD result?
This would probably give some hint as to the large std. Perhaps there
are small number of outliers that contribute to the large variation?
You can use matlab, something like
t2 = MRIread('T2_siemsn_reg.mgz');
seg = MRIread('aparc+aseg.mgz');
ind = find(seg.vol == 17); % left hippo
t2hip = t2.vol(ind);
See $FREESURFER_HOME/FreeSurferColorLUT.txt for a list of segmentation
numbers
_Question 2_: (just to put my mind at rest): if both tkregister2 and
freeview show show that the maps register accurately on the
segmentation data, does it mean that mri_segstats masks the T2 maps
correctly?
I’m asking this because if the segmentation masks are off by, e.g.,
90-degree, it would cause to a large number of values=4000 to be
included in the mean/std values.
It should. You can also try
tkmedit -f t2file.mgz -seg aparc+aseg.mgz
Thanks!
— Noam
On Jan 27, 2015, at 7:30 PM, Douglas Greve <gr...@nmr.mgh.harvard.edu
<mailto:gr...@nmr.mgh.harvard.edu>> wrote:
It is finding 0s in the T2 (the range is 0-4000). I'm not sure about
the 4000, but the 0s indicate that something is strange with that
image. How was it created?
On 1/27/15 1:22 PM, Ben Eliezer, Noam wrote:
— I (think that) I am not really interested in converting into
rawavg coordinate system, but just need to register my T2 maps to
the segmentation maps.
So, I guess that aseg+aparc.mgz will suffice in my case
— Regarding the mean +- std values:
Yes - the T2 maps are whole brain. could that account for the large STD?
I have tried running it w/o --seg-erode.… the mean values stay
similar yet, the standard-deviation increases significantly.
I’ve also tried erode=2 pixels, which gave identical results to
erode=1 pixel.
With erode (2 pixels):
# ColHeaders Index SegId NVoxels Volume_mm3 StructName Mean StdDev
Min Max Range
1 2 125567 125567.0 Left-Cerebral-White-Matter
97.9045 68.8609 0.0000 4000.0000 4000.0000
2 7 10833 10833.0 Left-Cerebellum-White-Matter
1.1878 14.7193 0.0000 608.0000 608.0000
3 41 130433 130433.0 Right-Cerebral-White-Matter
96.1764 60.0490 0.0000 4000.0000 4000.0000
4 46 11551 11551.0 Right-Cerebellum-White-Matter
1.2395 15.3000 0.0000 453.0000 453.0000
With erode (1 pixel):
# ColHeaders Index SegId NVoxels Volume_mm3 StructName Mean StdDev
Min Max Range
1 2 125567 125567.0 Left-Cerebral-White-Matter
97.9045 68.8609 0.0000 4000.0000 4000.0000
2 7 10833 10833.0 Left-Cerebellum-White-Matter
1.1878 14.7193 0.0000 608.0000 608.0000
3 41 130433 130433.0 Right-Cerebral-White-Matter
96.1764 60.0490 0.0000 4000.0000 4000.0000
4 46 11551 11551.0 Right-Cerebellum-White-Matter
1.2395 15.3000 0.0000 453.0000 453.0000
Without erode:
# ColHeaders Index SegId NVoxels Volume_mm3 StructName Mean StdDev
Min Max Range
1 2 193533 193533.0 Left-Cerebral-White-Matter
99.1265 125.6069 0.0000 4000.0000 4000.0000
2 7 17794 17794.0 Left-Cerebellum-White-Matter
7.2259 65.3060 0.0000 4000.0000 4000.0000
3 41 197895 197895.0 Right-Cerebral-White-Matter
96.9839 115.9002 0.0000 4000.0000 4000.0000
4 46 17999 17999.0 Right-Cerebellum-White-Matter
6.0798 88.1490 0.0000 4000.0000 4000.0000
It’s indeed encouraging that using the erode option decreases the
STD, but I’m still wondering whether there a way to validate
accuracy of the values.
Thanks!
Noam
On Jan 27, 2015, at 6:50 PM, Douglas Greve
<gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>> wrote:
On 1/27/15 12:38 PM, Ben Eliezer, Noam wrote:
Thanks Doug.
I’ve made two changes to the set of commands.
*1.* Following your suggestion, I’ve shifted from --init-spm to
--init-header and now tkregister2 shows that the registration is OK.
>>tkregister2 --mov T2_siemens.mgz --reg T2_siemens_regMat.dat —surf
Thanks!
*2.* When loading the result of vol2vol command (T2_siemens_reg.mgz):
>> mri_vol2vol --mov T2_siemens.mgz --targ
subj01/mri/aparc+aseg-in-rawavg.mgz --interp nearest --o
T2_siemens_reg.mgz --reg T2_siemens_regMat.dat --no-save-reg
into freeview the maps are rotated 90-deg in-plane and 90-deg
through plane versus the segmentation maps — in short they do not
match in orientation.
I’ve solved this by changing from using aseg+aparc-in-rawavg.mgz
to aseg+aparg.mgz
>> mri_vol2vol --mov T2_siemens.mgz --targ
subj01/mri/aparc+aseg.mgz --interp nearest --o T2_siemens_reg.mgz
--reg T2_siemens_regMat.dat --no-save-reg
_Question1:_ Is that a correct approach? not to use the rawavg
coordinate system?
Oh, I did not see that. Yes, that is the problem. If you want to
use the rawavg coordinate system, then you'll have to create
another registration file because the one that you have only goes
between the T2 and the conformed 256 1mm space. Let me know if that
is what you want.
—
Now, I re- gather statistics using:
>> mri_segstats --seg $FSsubjDIR/mri/aparc+aseg.mgz --id 2 7 41 46
--ctab $FREESURFER_HOME/FreeSurferColorLUT.txt --i
T2_siemens_reg.mgz --sum T2_siemens_stats.stats --seg-erode 1
and get the following values:
# ColHeaders Index SegId NVoxels Volume_mm3 StructName Mean
StdDev Min Max Range
1 2 125567 125567.0 Left-Cerebral-White-Matter
97.9045 68.8609 0.0000 4000.0000 4000.0000
2 7 10833 10833.0 Left-Cerebellum-White-Matter
1.1878 14.7193 0.0000 608.0000 608.0000
3 41 130433 130433.0 Right-Cerebral-White-Matter
96.1764 60.0490 0.0000 4000.0000 4000.0000
4 46 11551 11551.0 Right-Cerebellum-White-Matter
1.2395 15.3000 0.0000 453.0000 453.0000
_Question 2:_
Is there any way to verify that these values are accurate…?
(I am a little worried by the large standard deviation values)
Yes, I see what you mean. Is the T2 whole brain? Have you tried it
without --seg-erode?
Thanks again for the prompt replies,
— Noam
On Jan 27, 2015, at 6:02 PM, Douglas Greve
<gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>> wrote:
First off, I would use --init-header instead of --init-spm.
Probably won't make a difference, but it is safer in this case.
Second, look at the registration in tkregister (bbregister prints
out the command line, you can just cut and paste).
doug
ps. Please remember to post the list instead of directly to us.
thanks!
On 1/27/15 11:23 AM, Ben Eliezer, Noam wrote:
Hi Doug —
My apologies for the confusion. Please ignore the commands set
below.
There is only one set of commands that I tried.
It’s:
>> mri_convert -it siemens_dicom -ot mgz
SEMC_siemens_T2maps/1.3.12.2.1107.5.2.19.45219.2014072207350934197931766.dcm
T2_siemens.mgz
>> bbregister --s subj01 --mov T2_siemens.mgz --reg
T2_siemens_regMat.dat --init-spm --t2
>> mri_vol2vol --mov T2_siemens.mgz --targ
subj01/mri/aparc+aseg.mgz --interp nearest --o
T2_siemens_reg.mgz --reg T2_siemens_regMat.dat --no-save-reg
>> mri_segstats --seg subj01/mri/aparc+aseg.mgz --id 2 7 41 46
--ctab $FREESURFER_HOME/FreeSurferColorLUT.txt --i
T2_siemens_reg.mgz --sum T2_siemens_stats.stats --seg-erode 1
But as I wrote below — loading the registered T2 map
T2_siemens_reg.mgz into Freeview shows that it’s incorrectly
registered on the segmentation maps.
Thanks and sorry for the confusion,
— Noam
On Jan 27, 2015, at 5:07 PM, Ben Eliezer, Noam
<noam.ben-elie...@nyumc.org <mailto:noam.ben-elie...@nyumc.org>>
wrote:
Hi Doug —
Thank you for the prompt reply!
I have indeed tried using bbregister (and consult the -- help)
but I am probably not using it correctly.
I’ve tried two set of commands:
>> mri_convert -it siemens_dicom -ot mgz
SEMC_siemens_T2maps/1.3.12.2.1107.5.2.19.45219.2014072207350934197931766.dcm
T2_siemens.mgz
>> bbregister --s subj01--mov T2_siemens.mgz --reg
T2_siemens_regMat.dat --init-spm --t2
>> mri_segstats —seg subj01/mri/aparc+aseg.mgz --id 2 7 41 46
--ctab $FREESURFER_HOME/FreeSurferColorLUT.txt --i
T2_siemens_reg.mgz --sum T2_siemens_stats.stats --seg-erode 1
or,
>> mri_convert -it siemens_dicom -ot mgz
SEMC_siemens_T2maps/1.3.12.2.1107.5.2.19.45219.2014072207350934197931766.dcm
T2_siemens.mgz
>> mri_vol2vol --mov T2_siemens.mgz --targ
subj01/mri/aparc+aseg.mgz --interp nearest --o
T2_siemens_reg.mgz --reg T2_siemens_regMat.dat --no-save-reg
>> mri_segstats --seg subj01/mri/aparc+aseg.mgz --id 2 7 41 46
--ctab $FREESURFER_HOME/FreeSurferColorLUT.txt --i
T2_siemens_reg.mgz --sum T2_siemens_stats.stats --seg-erode 1
Both set of commands age the same statistics values, yet, in
both cases the registration seemed wrong, when running:
>>tkregister2 --mov T2_siemens.mgz --reg T2_siemens_regMat.dat —surf
so I am not sure if the values I get are ok….
Also, when loading the registered T2 maps (T2_siemens_reg.mgz)
into Freeview they did not coincide with my aseg+aparc.mgz or
aseg+aparc-in-rawavg.mgz
Any help would be highly appreciated!
Best!
Noam
On 1/27/15 2:11 AM, Ben Eliezer, Noam wrote:
Hello ---
I'm trying to extract quantitative T2 values for different brain segments.
I've converted my T2 set of DICOMs to .mgz format using
mri_convert and loaded them into freeview. >> mri_convert
-it siemens_dicom -ot mgz T2_maps_Dir/slice_1_T2_map.dcm
T2_in_mgz.mgz After loading T2_in_mgz.mgz to Freeview the
T2 maps seem to coincide very well with the segmentation
maps (aseg+aparc-in-rawavg.mgz).
My questions are:
1. Should I have applied some pre-registration operation on
the T2 maps before loading them into freeview, or does the
fact that they coincide with the segmentation maps mean
that I don't need to apply any registration?
Since they are in the same session, they will be pretty close
in registration, it just depends on how much the subject moved
between the two acquisitions. As a matter of course, I would
run a registration on them (bbregister with --init-header).
This subject may not have moved much but it is no guarantee
that others won't move more.
2. How can I extract mean T2 values for different segments?
(not the usual volume-per-segment)
Use mri_segstats. Run with --help to get examples
doug
Much obliged!
--- Noam
--
Noam Ben-Eliezer, PhD
Adjunct Assistant Professor of Radiology
Center for Biomedical-Imaging
New-York University Medical School
noam.ben-elie...@nyumc.org <http://nyumc.org/>
<mailto:noam.ben-elie...@nyumc.org>
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.