Hi John,

45 degrees was just to make it easier the visualization of how Caret deals
with the transformation matrix.

A more realistic example would be the transformation after coregistration.
If I coregister the 3D to the functional volumes, probably the 3D volume
will not be in one of the standard orientations anymore. If Caret opens
the volume as if there was no orientation specified, the coregistration
will be lost.

After your explanations, it seems to me that I always need to reslice my
volumes before openning it with Caret (except when i am sure that the
volume is already stored in the standard orientation). Correct?

thanks,
Mateus

>
> On Nov 17, 2006, at 12:38 PM, Mateus Joffily wrote:
>
>> Hi John,
>>
>> Thanks. Now, I understand. I thought that the reported dimensions
>> and voxel sizes refered to the volume (I,J,K) dimensions (voxel
>> coordinates), and not to the (X,Y,Z) dimensions (real world
>> coordinates). Please, correct me if I am still wrong?
>
> You might call it real world coordinates but I would probably call it
> stereotaxic coordinates.
>
>>
>> I have another question: Does Caret take into account any rotation
>> specified in the nifti-1 header? Or is there any incompatibility
>> with transformations done by SPM5?
>>
>> To better explain my question, let me describe the following test
>> that I did:
>>
>> 1) I rotated my 3D_original.nii image of 45degrees around the X-
>> axis (see 3D_original_rotated_spm5.pdf).
>> 2) I saved this rotation in the image header, but I didn't reslice
>> the image.
>> 3) When I loaded the rotated image with Caret, I couldn't see
>> anything in the P(YZ) and C(XZ) planes. However the H(XY) plane was
>> displayed as if the image was not rotated. When I used the 'x', 'y'
>> and 'z' control buttons to navigate through the image, the H(XY)
>> slices were displayed as if it was the non-rotated 3D_original.nii.
>> The reported dimensions and voxel sizes were 124x201x151 and
>> 1.3x1.326x0.00, respectively.
>>
>> Is it right?
>>
>
> Why would you store a volume at a 45 degree orientation?
>
> When Caret reads a NIFTI volume, it examines the transformation
> matrix to determine the orientation of the volume's three axes.  If
> these orientations correspond what I would call the standard
> orientations (left-to-right, right-to-left, anterior-to-posterior,
> posterior-to-anterior, inferior-to-superior, or superior-to-
> inferior), Caret will permute the volume so that it is displayed
> properly.  If the orientations of the axes do not correspond to the
> standard orientations, Caret will read the volume and display the
> volume as if there was no orientation data in the volume.
>
>> Thanks,
>> Mateus
>>
>> John Harwell wrote:
>>
>>> Mateus,
>>>
>>> A volume has three-dimensions which are commonly indexed with I,
>>> J,  and K.
>>>
>>> When Caret loads a volume it always stores the voxels such that
>>> the  voxels run left-to-right in the first dimension ("I"),
>>> posterior-to- anterior in the second dimension ("J"), and inferior-
>>> to-superior  ("K") in the third dimension.  This is commonly
>>> referred to as an  "LPI" orientation and negative X points to the
>>> left side of the head,  negative Y points to the back of the head,
>>> and negative Z points down  into the neck.  This is the same
>>> orientation used by the Talairach  atlas which places the origin
>>> at the anterior commissure.
>>>
>>> Your volume has the voxels running anterior-to-posterior in the
>>> first  dimension ("I"), inferior-to-superior in the second
>>> dimension ("J"),  and left-to-right in the third dimension("K").
>>> This is an AIL  orientation.
>>>
>>> Since Caret wants the volume in an LPI orientation and your volume
>>> is  in an AIL orientation, Caret will reorganize the voxels in
>>> memory so  that the volume is in an LPI orientation.  It is this
>>> reorientation  operation that results in the voxel sizes and
>>> dimensions being permuted.
>>>
>>>
>>>
>>> Output of 3DInfo for your volume and your volume saved by Caret
>>> with  an LPI orientation:
>>>
>>>
>>> Dataset File:    3D_original.nii
>>> Identifier Code: NII_Oo8IAJJUzJFWVH2nBnBIQA  Creation Date: Thu
>>> Nov  16 13:44:28 2006
>>> Dataset Type:    Anat Bucket (-abuc)
>>> Byte Order:      LSB_FIRST {assumed} [this CPU native = MSB_FIRST]
>>> Storage Mode:    NIFTI file
>>> Data Axes Orientation:
>>>   first  (x) = Anterior-to-Posterior
>>>   second (y) = Inferior-to-Superior
>>>   third  (z) = Left-to-Right   [-orient AIL]
>>> R-to-L extent:   -80.652 [R] -to-    79.248 [L] -step-     1.300
>>> mm  [124 voxels]
>>> A-to-P extent:   -73.912 [A] -to-   113.588 [P] -step-     0.938
>>> mm  [201 voxels]
>>> I-to-S extent:   -70.210 [I] -to-    70.415 [S] -step-     0.938
>>> mm  [151 voxels]
>>> Number of values stored at each pixel = 1
>>>   -- At sub-brick #0 '?' datum type is float
>>>
>>>
>>> -----------------
>>>
>>> Dataset File:    3D_original_saved_with_caret.nii
>>> Identifier Code: NII_Ffg_VXBk3o4b2q-dpSG84g  Creation Date: Thu
>>> Nov  16 13:44:41 2006
>>> Dataset Type:    Anat Bucket (-abuc)
>>> Byte Order:      MSB_FIRST {assumed} [this CPU native = MSB_FIRST]
>>> Storage Mode:    NIFTI file
>>> Data Axes Orientation:
>>>   first  (x) = Left-to-Right
>>>   second (y) = Posterior-to-Anterior
>>>   third  (z) = Inferior-to-Superior   [-orient LPI]
>>> R-to-L extent:   -80.653 [R] -to-    79.248 [L] -step-     1.300
>>> mm  [124 voxels]
>>> A-to-P extent:   -73.912 [A] -to-   113.588 [P] -step-     0.938
>>> mm  [201 voxels]
>>> I-to-S extent:   -70.210 [I] -to-    70.415 [S] -step-     0.938
>>> mm  [151 voxels]
>>> Number of values stored at each pixel = 1
>>>   -- At sub-brick #0 '?' datum type is float
>>>
>>> ----------------------------------------------------------
>>> John Harwell
>>> [EMAIL PROTECTED]
>>> 314-362-3467
>>>
>>> Department of Anatomy and Neurobiology
>>> Washington University School of Medicine
>>> 660 S. Euclid Ave.    Box 8108
>>> St. Louis, MO 63110   USA
>>>
>>> On Nov 16, 2006, at 11:39 AM, Mateus Joffily wrote:
>>>
>>>> Hi John,
>>>>
>>>> Although the image orientation is fine and the origin is
>>>> correctly  localized at the AC, it still seems to have some
>>>> problem with the  image dimension and voxel size.
>>>>
>>>> The correct image dimension and voxel size are 201 x 151 x 124
>>>> and  -0.938 x 0.938 x 1.3 (X x Y x Z), respectively (see the
>>>> 3D_original_spm5.pdf file that I uploaded).  However, the values
>>>> reported by Caret are 124 x 201 x 151 and 1.3 x 0.938 x 0.938.
>>>>
>>>> Thanks for your help,
>>>> Mateus
>>>>
>>>>
>>>> John Harwell wrote:
>>>>
>>>>> Mateus,
>>>>>
>>>>> To download updated versions of Caret:
>>>>>
>>>>> 1) Go to the website "http://brainmap.wustl.edu/pub/john/";.
>>>>> Use  the  username "pub" and the password "download" to access
>>>>> the web  site.
>>>>> 2) Download the file caret5_exe_linux.zip or
>>>>> caret5_exe_windows.zip  which contain the linux and windows
>>>>> versions of the caret5 executable.
>>>>>
>>>>> To install:
>>>>>
>>>>> 1) Go into your Caret installation's "bin" directory and
>>>>> backup   (rename) your current caret5 executable.
>>>>> 2) Place the downloaded file in the Caret installation's "bin"
>>>>> directory and unzip the downloaded file which will produce
>>>>> either   caret5 or caret5.exe.  You might have to change the
>>>>> permissions  on  linux using the command "chmod a+rx caret5".
>>>>>
>>>>>
>>>>> As for the negative "x" voxel size, this usually means the the
>>>>> origin  is specified on the right side of the volume and that
>>>>> the  voxels are  ordered right-to-left.  When Caret reads a
>>>>> volume and  the volume  contains valid orientation information,
>>>>> Caret "flips"  the volume in  memory to place the volume in an
>>>>> LPI (-x=left, - y=posterior, - z=inferior) orientation.  Visit
>>>>> the website  "http:// www.grahamwideman.com/gw/brain/
>>>>> orientation/ orientterms.htm" for more  information.
>>>>>
>>>>> ----------------------------------------------------------
>>>>> John Harwell
>>>>> [EMAIL PROTECTED]
>>>>> 314-362-3467
>>>>>
>>>>> Department of Anatomy and Neurobiology
>>>>> Washington University School of Medicine
>>>>> 660 S. Euclid Ave.    Box 8108
>>>>> St. Louis, MO 63110   USA
>>>>>
>>>>> On Nov 15, 2006, at 4:08 AM, Mateus Joffily wrote:
>>>>>
>>>>>> Hi John,
>>>>>>
>>>>>> Thank you very much. The image looks good to me. I use Linux
>>>>>> and   Windows (preference for Linux).
>>>>>> Just one more question: How does Caret deals with the negative
>>>>>> 'x'  voxel size set by SPM5? Does it affect the way Caret
>>>>>> displays the  image? In the 'Volume Attributes Editor'  dialog
>>>>>> -  'Resample' tab,  the voxel size is always positive.
>>>>>>
>>>>>> thanks,
>>>>>> Mateus
>>>>>>
>>>>>> John Harwell wrote:
>>>>>>
>>>>>>> Hi Mateus,
>>>>>>>
>>>>>>> I think I have the problem corrected and here is how
>>>>>>> 3D_original.nii  appears in Caret.  If the images look good
>>>>>>> to  you  let me know which  operating system you are using and
>>>>>>> I  will make  an update available  for you to download.  This
>>>>>>> problem only  occurred if the X-axis was  not left/right, the
>>>>>>> Y- axis was not  posterior/anterior, or the Z-axis  not
>>>>>>> inferior/ superior.
>>>>>>>
>>>>>>>
>>>>>>> ----------------------------------------------------------
>>>>>>> John Harwell
>>>>>>> [EMAIL PROTECTED]
>>>>>>> 314-362-3467
>>>>>>>
>>>>>>> Department of Anatomy and Neurobiology
>>>>>>> Washington University School of Medicine
>>>>>>> 660 S. Euclid Ave.    Box 8108
>>>>>>> St. Louis, MO 63110   USA
>>>>>>>
>>>>>>> On Nov 13, 2006, at 3:33 AM, Mateus Joffily wrote:
>>>>>>>
>>>>>>>> Hi John,
>>>>>>>>
>>>>>>>> I uploaded four files in Caret, their names are:
>>>>>>>>
>>>>>>>> 1) 3D_original.nii : original volume that doesn't display
>>>>>>>> correctly  in Caret (case 1 described in my previous message)
>>>>>>>> 2) 3D_original_spm5.pdf : capture of 3D_original.nii display
>>>>>>>> in  spm5
>>>>>>>> 1) 3D_resliced.nii : same original volume but resliced (case
>>>>>>>> 2   described in my previous message)
>>>>>>>> 1) 3D_resliced_spm5.pdf : capture of 3D_resliced.nii display
>>>>>>>> in  spm5
>>>>>>>>
>>>>>>>> Thank you very much.
>>>>>>>>
>>>>>>>> Mateus
>>>>>>>>
>>>>>>>>
>>>>>>>> John Harwell wrote:
>>>>>>>>
>>>>>>>>> Hi Mateus,
>>>>>>>>>
>>>>>>>>> Can you upload the nifti volume that is not displayed
>>>>>>>>> correctly   in  Caret at "http://pulvinar.wustl.edu/cgi-bin/
>>>>>>>>> upload.cgi".    Also, can  you capture and upload an image
>>>>>>>>> of  the volume  displayed  correctly in  SPM5 so that I know
>>>>>>>>> how  it should appear.
>>>>>>>>>
>>>>>>>>> After uploading the files, please email me the names of
>>>>>>>>> the    files.   It may be a few days before I can look into
>>>>>>>>> this  problem.
>>>>>>>>>
>>>>>>>>> ----------------------------------------------------------
>>>>>>>>> John Harwell
>>>>>>>>> [EMAIL PROTECTED]
>>>>>>>>> 314-362-3467
>>>>>>>>>
>>>>>>>>> Department of Anatomy and Neurobiology
>>>>>>>>> Washington University School of Medicine
>>>>>>>>> 660 S. Euclid Ave.    Box 8108
>>>>>>>>> St. Louis, MO 63110   USA
>>>>>>>>>
>>>>>>>>> On Nov 10, 2006, at 9:42 AM, Mateus Joffily wrote:
>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> I am having some trouble to load nifti images with
>>>>>>>>>> caret5.   The   problem is the following:
>>>>>>>>>>
>>>>>>>>>> 1) When I try to load an image that has a rotation
>>>>>>>>>> specified   in  the  header, Caret seems not to apply it
>>>>>>>>>> properly. The   displayed  image  shows a strange
>>>>>>>>>> orientation and the voxels   size is wrong.
>>>>>>>>>>
>>>>>>>>>> 2) However, when the same image is resliced and no
>>>>>>>>>> rotation   is   specified in its header, Caret displays the
>>>>>>>>>> image   correctly, the   voxels size are correct and the
>>>>>>>>>> image  origin  is also correctly   located.
>>>>>>>>>>
>>>>>>>>>> Those same images, (1) and (2), are both correctly
>>>>>>>>>> displayed   with  SPM5.
>>>>>>>>>>
>>>>>>>>>> The images extension is .nii, so I don't think this should
>>>>>>>>>> be  a   problem related to image format interpretation
>>>>>>>>>> (like   interpreting  nifti images as analyze and ignoring
>>>>>>>>>> part of the   header information).
>>>>>>>>>>
>>>>>>>>>> Does anyone else has experienced this problem?  Thanks
>>>>>>>>>> for   your  help.
>>>>>>>>>>
>>>>>>>>>> Mateus
>>>>>>>>>> _______________________________________________
>>>>>>>>>> caret-users mailing list
>>>>>>>>>> caret-users@brainvis.wustl.edu
>>>>>>>>>> http://pulvinar.wustl.edu/mailman/listinfo/caret-users
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> caret-users mailing list
>>>>>>>>> caret-users@brainvis.wustl.edu
>>>>>>>>> http://pulvinar.wustl.edu/mailman/listinfo/caret-users
>>>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________ caret-users
>>>>>>> mailing list caret-users@brainvis.wustl.edu http://
>>>>>>> pulvinar.wustl.edu/mailman/listinfo/caret-users
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> caret-users mailing list
>>>>>> caret-users@brainvis.wustl.edu
>>>>>> http://pulvinar.wustl.edu/mailman/listinfo/caret-users
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> caret-users mailing list
>>>>> caret-users@brainvis.wustl.edu
>>>>> http://pulvinar.wustl.edu/mailman/listinfo/caret-users
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> caret-users mailing list
>>>> caret-users@brainvis.wustl.edu
>>>> http://pulvinar.wustl.edu/mailman/listinfo/caret-users
>>>
>>>
>>> _______________________________________________
>>> caret-users mailing list
>>> caret-users@brainvis.wustl.edu
>>> http://pulvinar.wustl.edu/mailman/listinfo/caret-users
>>>
>>>
>>
>> <3D_original_rotated_spm5.pdf>
>> _______________________________________________
>> caret-users mailing list
>> caret-users@brainvis.wustl.edu
>> http://pulvinar.wustl.edu/mailman/listinfo/caret-users
>
> _______________________________________________
> caret-users mailing list
> caret-users@brainvis.wustl.edu
> http://pulvinar.wustl.edu/mailman/listinfo/caret-users
>
>


Reply via email to