[Insight-developers] Streaming with SliceBySliceImageFilter

Bradley Lowekamp blowekamp at mail.nih.gov
Wed Aug 4 11:49:54 EDT 2010


Hello Gaetan,

First let me thank you for all you IJ contributions, I am trying to use a surprising number of them with the pipeline I am assembling: 

reader->SliceBySlice( GrayscaleMorphologicalOpeningImageFilter )->ProjectionImageFilter( EntropyAccumulator )->StreamingImageFilter

At any rate the documentation for SliceBySliceImageFilter says:

 * The requested region is always enlarged by the filter to cover entirely
 * the whole slice - however, only the slice in the requested region are
 * processed (the requested region is not enlarged to the whole image if
 * not needed).
 *

That lead me to believe that this filter should stream in a nice fashion slice by slice. I observed that is was not streaming, because we have the following implementation:

::GenerateInputRequestedRegion()
{
  // call the superclass' implementation of this method
  Superclass::GenerateInputRequestedRegion();

  for( unsigned int i = 0; i < this->GetNumberOfInputs(); i++ )
    {
    InputImagePointer  inputPtr = const_cast< InputImageType * >( this->GetInput( i ) );
  
    if ( !inputPtr )
      { 
      return;
      }
  
    inputPtr->SetRequestedRegion(inputPtr->GetLargestPossibleRegion());
    }
}


This looks easily fixed, which I will begin on. Just wondering if there were problem that you encountered or was there another reason for not streaming?

Thanks,
Brad

========================================================
Bradley Lowekamp  
Lockheed Martin Contractor for
Office of High Performance Computing and Communications
National Library of Medicine 
blowekamp at mail.nih.gov


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20100804/273cc452/attachment.htm>


More information about the Insight-developers mailing list