[Insight-users] Continuous Index

Luis Ibanez luis.ibanez at kitware.com
Tue Jun 30 12:29:19 EDT 2009


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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090630/1115d5b2/attachment-0001.htm>


More information about the Insight-users mailing list