Hi,
The (0,0,0) coordinate is encoded by the nifti files and
most likely comes from the scanner coordinate system. In
that case it encodes where the scanner believed the centre
of the scanner's coordinates were within the image. Hence
this may not be of interest to you.
If, for any reason, you still do want to know where that is
without using fslview, then you can use:
std2imgcoord -img image_name -vox coord_file
to extract corresponding voxel coordinates to the mm coordinates
contained in the file coord_file (one set of 3 values per line)
which will use the same calculations that FSLView does to
convert between mm and vox. Note that this does not rely on
the image being related to std space in this case - it will
work for any image.
Hope this is of some help.
All the best,
Mark
On 15 Oct 2007, at 02:25, Ping-Hong Yeh wrote:
> Hi Matt and Mark,
>
> Thanks for the reply.
> I only need to know the correpsonding vox for the center of a ROI
> so I can
> use the fslroi to get the tissue imformation after I ran the fast.
> Since the
> MPRAGE (256*256*154) were in the native space and I will not
> transform them
> to the MNI standard space, I don't think the std2imgcoord or
> img2imgcoord
> are what I need.
> I am wondering how fslview get the coordianates in mm of (0,0,0),
> which
> varies between the image even though they were inthe same resolution?
> I can transform the mm to vox once I knew these x y z .
> Regards,
>
> Ping
>
>
>
> On Sun, 14 Oct 2007 22:13:51 +0100, Mark Jenkinson
> <[log in to unmask]> wrote:
>
>> Dear Matt,
>>
>> It has been - under misc flirt utilities linked near the top of
>> the main
>> flirt page (as flirt is the main tool dealing with registration and
>> coordinates).
>> See:
>> http://www.fmrib.ox.ac.uk/fsl/flirt/overview.html#misc
>>
>> All the best,
>> Mark
>>
>>
>>
>> On 14 Oct 2007, at 22:03, Matt Glasser wrote:
>>
>>> Would be nice if that were documented somewhere. :)
>>>
>>> -----Original Message-----
>>> From: FSL - FMRIB's Software Library [mailto:[log in to unmask]] On
>>> Behalf
>>> Of Mark Jenkinson
>>> Sent: Sunday, October 14, 2007 4:53 PM
>>> To: [log in to unmask]
>>> Subject: Re: [FSL] mm to vox coordinate
>>>
>>> Dear Ping,
>>>
>>> You can use the command:
>>> std2imgcoord
>>> to convert between coordinates (also img2imgcoord and img2stdcoord).
>>> These are easy to incorporate within scripts.
>>>
>>> All the best,
>>> Mark
>>>
>>>
>>> On 14 Oct 2007, at 21:05, Ping-Hong Yeh wrote:
>>>
>>>> Hi,
>>>>
>>>> I'd like to know the antomate way of converting the coordinates in
>>>> mm to vox
>>>> so I could extract the ROI using fslroi. I knew I can just open the
>>>> fslview
>>>> and get the vox, but would perfer not to do so. I have used the SPM
>>>> scripts
>>>> (i.e. mm = [-22, 50, 50]; % example co-ordinates.
>>>> V = spm_vol(spm_get(1,'*.img'));
>>>> M = inv(V.mat);
>>>> vox = (M(1:3,1:3)*mm' + repmat(M(1:3,4),1,size(mm,1)))', )
>>>>
>>>> but it did not get the right vox coordinate, not knowing why?
>>>>
>>>> Thanks.
>>>>
>>>> Ping
|