I had a class which was deriving from ImageToImage filter and in its constructor I was setting Inputs and Outputs in the following manner:
this->SetPrimaryInputName("BaselineImage");
this->AddRequiredInputName("BaselineImage");
this->AddRequiredInputName("FollowupImage");
this->AddRequiredInputName("BaselineICC");
this->AddRequiredInputName("FollowupICC");
this->SetNumberOfRequiredOutputs( 2 );
this->SetOutput("BaselineImage",this->MakeOutput(0)); 
this->SetOutput("FollowupImage",this->MakeOutput(1));
this->SetTransformationTypeToCombined(); 
Here is how the class has been derived:
template<typename BaselineImageType, typename FollowupImageType, typename MaskType>
	class MyFilterClass : public itk::ImageToImageFilter<BaselineImageType, itk::Image<float,BaselineImageType::ImageDimension> >
This worked, but I am now trying to derive from ProcessObject instead:
template<typename BaselineImageType, typename FollowupImageType, typename MaskType>
	class MyFilterClass : public itk::ProcessObject
And for some reason I am receiving now: Segmentation Fault (core dumped). I’ve tried debugging it and I figured it is occurring during the call of MakeOutput(0).
Any ideas why this is happening and how can avoid using MakeOutput when deriving from ProcessObject, or at least use it correctly?
