<div>If I create an adaptor to represent one channel of a vector image:</div><div><br></div><div>typedef itk::VectorImage&lt;float, 2&gt; VectorImageType;</div><div><br></div><div>  VectorImageType::Pointer image = VectorImageType::New();</div>
<div>  ... Create image ... </div><div><br></div><div>  typedef itk::VectorImageToImageAdaptor&lt;float, 2&gt; ImageAdaptorType;</div><div>  ImageAdaptorType::Pointer adaptor = ImageAdaptorType::New();</div><div>  adaptor-&gt;SetExtractComponentIndex(0);</div>
<div>  adaptor-&gt;SetImage(image);</div><div><br></div><div>And then try to create an iterator:</div><div><br></div><div>  itk::ImageRegionIterator&lt;ImageAdaptorType&gt; imageIterator(adaptor, adaptor-&gt;GetLargestPossibleRegion());</div>
<div><br></div><div>I get this error:</div><div><br></div><div><div>itkImageAdaptor.hxx:334:36: error: cannot convert ‘itk::VectorImage&lt;float, 2u&gt;::InternalPixelType* {aka float*}’ to ‘const InternalPixelType* {aka const itk::VariableLengthVector&lt;float&gt;*}’ in return</div>
</div><div><br></div><div>I also tried using the resulting scalar image type for the iterator:</div><div><br></div><div>typedef itk::Image&lt;float, 2&gt; ScalarImageType;</div><div>itk::ImageRegionIterator&lt;ScalarImageType&gt; imageIterator(adaptor, adaptor-&gt;GetLargestPossibleRegion());</div>
<div><br></div><div>but of course I get this error:</div><div><div>VectorImageToImageAdaptor.cxx:35:103: error: no matching function for call to ‘itk::ImageRegionIterator&lt;itk::Image&lt;float, 2u&gt; &gt;::ImageRegionIterator(itk::VectorImageToImageAdaptor&lt;float, 2u&gt;::Pointer&amp;, const RegionType&amp;)’</div>
</div><div><br></div><div>Is it not possible to iterate over an adaptor like this?</div><div><br></div>Thanks,<br><br>David<br>