[Insight-users] Continuous Index
Xiang Hao
haoxiang at yahoo.cn
Tue Jun 30 13:22:16 EDT 2009
Hi Luis,
Thank you so much, Luis. I will try it, and BTW, as I remember, there is a
problem about setPixel() and getPixel() method while I am using the
ContinuousIndex. It said it cannot find the corresponding method. Anyway, I
will try your method and try to make it work.
Thank you again,
Xiang
On Tue, Jun 30, 2009 at 10:29 AM, Luis Ibanez <luis.ibanez at kitware.com>wrote:
>
>
> Hi Xian,
>
> If you need sub-pixel locations for the points of the fibers,
> yes, it makes sense to use ContinuousIndex instead of
> Indexes for representing the location of fibers centers.
>
> That said, it may be preferable to use itk::Point<> since
> that will take into account also the pixel spacing, image
> origin, and image orientation, and you will be able to
> do things like overlapping a visualization of the fibers
> with the original image.
>
> A) If you need to convert Index to ContinousIndex you
> can use the method:
>
> Constructor
>
> IndexType index;
> ContinuousIndexType cindex( index );
>
> B) In order to convert Continuous index to Index you
> can use the method CopyWithRound()
>
> index.CopyWithRound( continousIndex )
>
> C) In order to convert an index into a physical point
> and back you can use the image methods
>
> TransformIndexToPhysicalPoint( index, point );
> TransformPhysicalPointToIndex(point, index );
>
>
>
> Regards,
>
>
>
> Luis
>
>
>
>
> ----------------------------------------------------------------------------------------------
> On Sun, Jun 28, 2009 at 2:42 PM, Xiang Hao <haoxiang at yahoo.cn> wrote:
>
>> Hi,
>>
>> I am trying to write a tractography program.
>> Now I use discrete index:
>>
>> Dimension =3;
>> typedef int OutputPixelType;
>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType;
>> OutputImageType::IndexType pixelIndex;
>>
>> So now the pixelIndex is discrete index and I want to change it to
>> continuous index. I know there is an ContinuousIndex class in ITK. I wonder
>> whether I should use this class and how to use it in order to change the
>> index to continuous index.
>>
>>
>> --
>> Cheers,
>> Xiang
>>
>>
>> --
>> Cheers,
>> Xiang
>>
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>>
>
--
Cheers,
Xiang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090630/e56357b4/attachment-0001.htm>
More information about the Insight-users
mailing list