[Insight-users] vector of index

David Doria daviddoria at gmail.com
Wed Jun 29 08:13:17 EDT 2011


On Wed, Jun 29, 2011 at 8:00 AM, Maria Alejandra Zuluaga Valencia
<mariazulv at yahoo.es> wrote:
> Hi all,
> I am requiring to create an array of indexes that represent different pixel
> positions in an image. I've found that itk::Array does not allow me to keep
> such structures. I was trying to find a container in itk that allows me to
> save these indexes but I haven't found anything that fits. On the 3.20
> documentation I found something called MapData and MapRecord but, there is
> not a clear description on what they can do. An alternative could be to use
> itk::Matrix but, I don't think this is very elegant.
>
> Does someone know if there is a container that could allow me to save the
> different indexes?
> thanks in advance,
> Maria A Zuluaga

You can always use std::vector<itk::Index<2> >

If you want to stay "ITK", I think you can use VectorContainer:
http://www.itk.org/Wiki/ITK/Examples/Utilities/VectorContainer

David


More information about the Insight-users mailing list