Re: [Insight-users] Vector type iterator

Tomáš Kazmar Tomash.Kazmar at seznam.cz
Mon Feb 25 14:57:04 EST 2008


Hi Vidya,

  if I understand you well, you are looking for NthElementImageAdaptor which
can be used like this:

  NthElementImageAdaptor<VectorImageType, PixelType> VectorAdaptorType;
  VectorAdaptorType::Pointer adaptor = VectorAdaptorType::New();
  adaptor->SetImage(your_vector_image);

Then when you want to copy in i-th image, you use usual iterators instantiated
over the adaptor:

  adaptor->SelectNthElement(i);
  ImageRegionIterator it(adaptor, region);


Regards,
Tomas

# I would like to combine data from multiple images into one vector-type 
# image. Assume I have N input images of size pxq. I want to combine them 
# into 1 image where each pixel is an N-D vector. I do not want to load 
# all the N images at once into the memory. How do I use it.Set() so that 
# I can write into one particular location in the N-D vector?
# 
# 
# Thank you.
# Vidya Rajagopalan
# _______________________________________________
# Insight-users mailing list
# Insight-users at itk.org
# http://www.itk.org/mailman/listinfo/insight-users
# 
# 
# 


More information about the Insight-users mailing list