[ITK-users] [ITK] Problem with itkImageToVTKImageFilter

siavashk siavashk at ece.ubc.ca
Mon Jul 13 13:46:41 EDT 2015


I do not think that removing the if statement is the right way. There is a
good reason why the null check is there in itkProcessObject. On the first
pass (before Update() is called), this->GetPrimaryOutput() is null. If you
remove the if-statement, the program terminates with a runtime memory error
when it tries to call
this->GetPrimaryOutput()->SetRequestedRegionToLargestPossibleRegion() on a
null pointer.

It seems that the right way is to call Update() first, so that
this->GetPrimaryOutput() is no longer null.

Is this the intended usage?

Siavash



--
View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-Problem-with-itkImageToVTKImageFilter-tp35888p35901.html
Sent from the ITK - Users mailing list archive at Nabble.com.


More information about the Insight-users mailing list