I am trying to follow Examples/NeighborhoodIterators1.cxx<br><br>In the example, there is:<br>  typedef itk::ConstNeighborhoodIterator&lt; ImageType &gt; NeighborhoodIteratorType;<br>...<br>  NeighborhoodIteratorType::RadiusType radius;<br>
  radius.Fill(1);<br>  NeighborhoodIteratorType it( radius, reader-&gt;GetOutput(),<br>
                               reader-&gt;GetOutput()-&gt;GetRequestedRegion() );<br><br>When I try to do the same thing inside itkConnectedThresholdImageFilter.h (I&#39;m attempting to modify it):<br><br>    typedef itk::ConstNeighborhoodIterator&lt; InputImageType &gt; NeighborhoodIteratorType;<br>
// I also tried removing the itk:: since I am now working inside itk:: already , with no change in the error<br>   // typedef ConstNeighborhoodIterator&lt; InputImageType &gt; NeighborhoodIteratorType;<br>
    NeighborhoodIteratorType::RadiusType radius;<br><br>I get<br>error: dependent-name &#39;itk::NeighborhoodIteratorType::RadiusType&#39; is parsed as a non-type, but instantiation yields a type<br>note: say &#39;typename itk::NeighborhoodIteratorType::RadiusType&#39; if a type is meant<br>

<br>I originally tried to create the iterator directly:<br>ConstNeighborhoodIterator&lt; InputImageType &gt; it(1, this-&gt;GetInputImage(), this-&gt;GetInputImage()-&gt;GetRequestedRegion() );<br><br>but I get a lovely template error:<br>
<br>/home/doriad/src/Insight/Code/Common/itkRegionEdgeFunction.h:128: error: no matching function for call to &#39;itk::ConstNeighborhoodIterator&lt;itk::Image&lt;float, 1u&gt;, itk::ZeroFluxNeumannBoundaryCondition&lt;itk::Image&lt;float, 1u&gt; &gt; &gt;::ConstNeighborhoodIterator(int, const itk::Image&lt;float, 1u&gt;*, const itk::ImageRegion&lt;1u&gt;&amp;)&#39;<br>
/home/doriad/src/Insight/Code/Common/itkConstNeighborhoodIterator.h:111: note: candidates are: itk::ConstNeighborhoodIterator&lt;TImage, TBoundaryCondition&gt;::ConstNeighborhoodIterator(const typename itk::Neighborhood&lt;typename TImage::InternalPixelType*, itk::ConstNeighborhoodIterator&lt;TImage, TBoundaryCondition&gt;::Dimension, itk::NeighborhoodAllocator&lt;typename TImageType::InternalPixelType*&gt; &gt;::SizeType&amp;, const TImage*, const typename TImage::RegionType&amp;) [with TImage = itk::Image&lt;float, 1u&gt;, TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition&lt;itk::Image&lt;float, 1u&gt; &gt;]<br>
/home/doriad/src/Insight/Code/Common/itkConstNeighborhoodIterator.txx:186: note: itk::ConstNeighborhoodIterator&lt;TImage, TBoundaryCondition&gt;::ConstNeighborhoodIterator(const itk::ConstNeighborhoodIterator&lt;TImage, TBoundaryCondition&gt;&amp;) [with TImage = itk::Image&lt;float, 1u&gt;, TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition&lt;itk::Image&lt;float, 1u&gt; &gt;]<br>
/home/doriad/src/Insight/Code/Common/itkConstNeighborhoodIterator.txx:158: note: itk::ConstNeighborhoodIterator&lt;TImage, TBoundaryCondition&gt;::ConstNeighborhoodIterator() [with TImage = itk::Image&lt;float, 1u&gt;, TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition&lt;itk::Image&lt;float, 1u&gt; &gt;]<br>
<br>Can anyone see what the problem may be?<br><br clear="all">Thanks,<br><br>David<br>