Great, Scott! You solved the problem. Now it works!
Thanks a lot,
Mateus
Scott Gorlin wrote:
I recently solved this problem. I believe the issue is that many
programs read *img/*hdr files and assume analyze format instead of
NIFTI, thus ignoring some of the hdr information. However, if you
convert the images to *.nii, Caret works fine.
Attached is a matlab file I wrote (create_nii.m) to convert between
the two. It requires Jimmy Shen's 'Tools for NIfTI (Analyze) MR
Image' toolbox for Matlab available at
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=8797&objectType=file,
or use any other scripts for the conversion.
-Scott Gorlin, graduate student
Mriganka Sur laboratory, MIT
Veronica S Smith wrote:
Hi Mateus,
I suspect that the problem is related to the difference in how each
of the two programs read (or don't read) the header, however, I am
not totally sure as I have not used SPM5 with Caret yet.
Typically the best way to get help on these types of issues is to
join the caret users group:
* subscribe by web -- caret-users info page; or
* subscribe by email -- [EMAIL PROTECTED]
Since you have already taken the time to type up the problem, I am
CCing [EMAIL PROTECTED] which will submit your question to get
an answer from Donna, the senior analyst in the lab. She is very
helpful!
Hope this helps,
Veronica
On Wed, 11 Oct 2006, Mateus Joffily wrote:
Hi Veronica,
Thank you very much for your help!
I am currently trying to use Caret5. But I am having trouble to
display on it the anatomy image (NIFTI-1 format) that I have
previously generated with SPM5 DICOM toolbox. Could you please help me?
When I display the image with SPM5, it seems fine (X goes from left
to right, Y goes from posterior to anterior and Z goes from inferior
to superior), the voxels size is correct -0.938x0.938x1.3 (except
for the fact that SPM5 sets X-voxel size as negative) and the origin
is set at voxels (108.8,154.9,62.08), over the AC.
However, when I display it with caret5, the orientation is not
correct (X goes from anterior to posterior, Y goes from inferior to
superior and Z goes from left to right), and the origin is indicated
as (-479, 0.938, 1.3) in the 'Volumes Attributes Editor' and as
(-359.06,120.94,81.90) in the' Main Window'. The voxel size is correct.
When I loaded the image, I specified that it was an anatomy volume,
and that the space was SPM5 in the spec file.
Do you have any idea about what could be the problem? Is caret5 able
to read NIFTI-1 metadata (orientation and stereotaxic coordinates)
generated by SPM5?
Thank you very much for any help.
Best regards,
Mateus
Veronica S Smith wrote:
Hi Mateus,
I am a Caret user and have some knowledge of Freesurfer.
I would say one of the biggest differences between the two software
packages for creating surface reconstructions is that Caret relies
on semi-automated processing of the MR images and Freesurfer is
fully automated. Once you get the hang of it, Caret takes about 4-6
hours per hemisphere (includes user and computer processing time).
Freesurfer takes approximately 20+ hours per brain once the image
is input. Both methods rely on high quality MR images to ensure
optimal results.
Also, Caret's surface is a reconstruction of approximately half way
between the GM/CSF boundary and the GM/WM boundary (cortical layer
4). I think Freesurfer reconstructs a GM/CSF surface--but double
check that.
Once Freesurfer is complete with processing, you can get cortical
thickness measures, but not with Caret.
Both software packages require notable memory (Caret -> 1-2 GB RAM)
and processor speed in order to allow for timely results.
That is a quick overview. I am happy to answer more specific
questions. Hope this helps.
-Veronica
On Tue, 10 Oct 2006, Mateus Joffily wrote:
Dear SPMers,
I am looking for a software that allows me to project SPM5
activations onto an inflated cortical surface. It seems that
freesurf and caret/surefit can do it. However, it is not clear for
me what are the pros and cons of each package. Does anyone has
some experience with them and can give me some advice? Thanks for
your help.
Mateus
_______________________________________________
caret-users mailing list
caret-users@brainvis.wustl.edu
http://pulvinar.wustl.edu/mailman/listinfo/caret-users
------------------------------------------------------------------------
function create_nii
x = menu('Process:', 'Files', 'Folder');
if x == 1
[fname fpath] = uigetfile('*.hdr', 'Select SPM5 Analyze/NIFTI...',
'MultiSelect','on');
if ~iscell(fname)
a = fname;
clear fname;
fname{1} = a;
end
elseif x == 2
fpath = uigetdir('', 'Select Batch Directory...');
files = dir([fpath '/*.hdr']);
for f = 1:length(files)
fname{f} = files(f).name;
end
else
return
end
for f = 1:length(fname)
clc
disp(['Writing ' fname{f} ' to file...']);
[hdr ft fp m] = load_nii_hdr(fullfile(fpath, fname{f}));
[nii.img nii.hdr] = load_nii_img(hdr, ft, fp, m);
fn = fname{f};
fn((end-2):end) = 'nii';
save_nii(nii, fullfile(fpath, fn));
end
clc;
disp('Done!');
return