Hello Insight Users<br><br>I just started ITK and I have a problem using the ConnectedThresholdImageFilter, I have a big image volume as input and then when performing the update there is a memory allocation problem.<br><br>
Can some body help me with the procedure on how to execute the filter by regions (if possible)<br><br>A part of my code:<br><br>typedef ITKToVTKImageImport::itkImageType InternalImageType;<br>        InternalImageType* image;    <br>
        InternalImageType* imageout;<br>        typedef itk::ConnectedThresholdImageFilter&lt; InternalImageType, InternalImageType &gt; ConnectedFilterType;<br>        ConnectedFilterType::Pointer connectedThreshold;<br>
        InternalImageType::IndexType  index;<br>        itk::Vector&lt;TypeImage, DIM&gt; spc;<br><br>        image = this-&gt;getITKImage();    <span style="color: rgb(255, 102, 102);">//Huge image input</span><br>        connectedThreshold = ConnectedFilterType::New();<br>
        connectedThreshold-&gt;SetInput( image );<br>        connectedThreshold-&gt;SetLower(  *_min  );<br>        connectedThreshold-&gt;SetUpper(  *_max  );<br>        spc = image-&gt;GetSpacing();<br>          <br>        index[0] = (*_point)[0]*spc[0];<br>
        index[1] = (*_point)[1]*spc[1];<br>        index[2] = (*_point)[2]*spc[2];<br><br>        connectedThreshold-&gt;SetSeed( index );<br>        connectedThreshold-&gt;SetReplaceValue( 255 );<br>        connectedThreshold-&gt;Update();                      <span style="color: rgb(255, 0, 0);">//Throws exception indicating the memory allocation problem</span><br>
        imageout = connectedThreshold-&gt;GetOutput();<br><br><br><br>Thank you very much<br>