Hi,
The units for both pointflirt or img2imgcoord can be in mm or voxels.
However, the default in pointflirt is mm and the default in img2imgcoord
is voxels, so the two lines you've included below would not work unless
your images were 1x1x1 mm with no qform or sform information.
To use voxel coordinates in pointflirt you need to specify the --vox
option
and both the --invol and --refvol options too. Note that the voxel
coordinates
are those shown by FSLView (which start at 0 and go to N-1).
Also note that unless your coordinates can actually be mapped by an
affine
transformation there is no guarantee that any set of coordinates, even
those
on a plane (I assume you do not mean a curved 2-D surface), can be
exactly mapped between spaces.
All the best,
Mark
On 3 Nov 2008, at 19:45, Yunjie Tong wrote:
> Hi Mark,
>
> Thanks for the suggestion. I am trying to use pointflirt. Here are
> some questions I encountered.
>
> 1. After using the pointflirt as: pointflirt -i input.txt -r
> ref.txt -o test.mat
>
> I tested the result by using: img2imgcoord -src input.nii -dest
> ref.nii -xfm test.mat
>
> ( input.txt has 4 coordinates in voxels from input.nii. ref.txt has
> the corresponding points from ref.nii )
>
> I found that I could not get a perfect match between the input and
> ref points, even if I confined the input and ref points on a 2-D
> surface.
>
> 2. The unit in input.txt should be mm or coordinate in voxels? How
> and why should I use --vox option in pointflirt?
>
> Thanks.
>
> Yunjie
>
>
> On Oct 25, 2008, at 4:09 AM, Mark Jenkinson wrote:
>
>> Hi,
>>
>> I'm afraid I am still not sure what you want.
>>
>> The "surface of the brain" is a convoluted shape in 3D
>> and mapping a 2D image "onto" this would require
>> something like flattening the cortical surface, which
>> you could do with FreeSurfer. If you are not wanting
>> it to map onto the external cortical surface, but instead
>> have a single 2D cross-sectional image of the brain
>> and wish to find the right plane in 3D to map this to then
>> you can either you flirt or pointflirt (which takes manually
>> selected coordinates) to do this.
>>
>> I hope this helps.
>>
>> All the best,
>> Mark
>>
>>
>> On 24 Oct 2008, at 14:09, Yunjie Tong wrote:
>>
>>> Hi Mark,
>>>
>>> Thanks for the reply. I would like to register my 2-D image onto
>>> the surface of the brain by knowing several corresponding
>>> locations on the surface of the brain. In Matlab, I found a
>>> function cpselect which can register 2-D image onto another 2-D
>>> image using the projective mode. I am just wondering if flirt can
>>> do 2-D to 3-D registration using spatial markers instead of
>>> anatomical features. Thanks.
>>>
>>> Best,
>>>
>>> Yunjie
>>>
>>>
>>> On Oct 23, 2008, at 6:16 PM, Mark Jenkinson wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm not sure by what you mean when you say "wrap my 2-D image" or
>>>> "project
>>>> a rectangular 2-D images ... onto the surface of a 3-D MRI brain
>>>> image".
>>>>
>>>> If the 2-D image corresponds to a cross section *through* the
>>>> volume of
>>>> the 3-D image then this is fine. If, instead, it consists of
>>>> values corresponding
>>>> to "surface" voxels of the brain then it is not possible.
>>>>
>>>> It should be possible with flirt to register your 2-D slice onto
>>>> a 3-D image
>>>> if you are in the first situation above. In this case all you
>>>> need to do is use
>>>> the 3-D image as the reference and the 2-D slice as the input,
>>>> although
>>>> getting an initial orientation which is "close" is often critical
>>>> in these situations.
>>>> You can either use pointflirt or nudge to help you with this.
>>>>
>>>> If this doesn't answer your question then please provide us with
>>>> a more detailed
>>>> description of your problem.
>>>>
>>>> All the best,
>>>> Mark
>>>>
>>>>
>>>> On 23 Oct 2008, at 18:51, Yunjie Tong wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I am trying to project a rectangular 2-D image (obtained from
>>>>> other imaging modality) onto the surface of a 3-D MRI brain
>>>>> image. I know the corresponding locations of the four corners
>>>>> (of my 2-D image) on the head. Can I use flirt to wrap my 2-D
>>>>> image on the head's surface based on those 4 locations
>>>>> (corners) ? Thanks in advance.
>>>>>
>>>>> Best,
>>>>>
>>>>> Yunjie
>>>
>
|