[ITK-dev] regarding ImageFileReader::GenerateOutputInformation()

Rashad M mohammedrashadkm at gmail.com
Thu Aug 13 14:55:19 EDT 2015


Hello all,

The documentation of   itk::ProcessObject::GenerateOutputInformation( )
 says
Generate the information describing the output data. [1]. The
GenerateOutputInformation()
in itkImageFileReader first create all instances of ImageIO and setup
direction, spacing, etc..

If I understand correctly, the GenerateOutputInformation in the image file
reader is  called by UpdateOutputInformation( )

To my question,
If I call reader->UpdateOutputInformation() for first time it calls
reader->GenerateOutputInformation() as described in docs[2].

Now If I have a second call to reader->UpdateOutputInformation( ) ?

Will it again go to GenerateOutputInformation() and createAllInstances of
imageio , do the same thing again!

In itkProcessObject.cxx, there is the below documentation

   * Call GenerateOutputInformation for subclass specific information.
   * Since UpdateOutputInformation propagates all the way up the pipeline,
   * we need to be careful here to call GenerateOutputInformation only if
   * necessary. Otherwise, we may cause this source to be modified which
   * will cause it to execute again on the next update.

How can I prevent it from calling it again in class sub class of
itk::ImageSource?

[1]
http://www.itk.org/Doxygen/html/classitk_1_1ProcessObject.html#abe61fb6b7de8c443e7af1561bd722736


-- 
Regards,
   Rashad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-developers/attachments/20150813/33db4097/attachment.html>


More information about the Insight-developers mailing list