Hello,
just a question of good practice:
It is okay to use the output of a filter as input for the same filter instance?
(non-functional) Example:
auto AddFilter = itk::AddImageFilter::New();
AddFilter->SetInput1(ImageX);
for (auto i = 0; i < somenumber; ++i)
{
AddFilter->SetInput2(OtherImageSource(i))
AddFilter->Update();
if(i<somenumber-1)
AddFilter->SetInput1(AddFilter->GetOutput());
}
auto Result = AddFilter->GetOutput();
I have implemented this and it works. Is this good practice or should i create somenumber of AddImageFilter and concatenate the Outputs and Inputs (getting rid of the for-loop for processing)?
with best regards,
Gordian