Skip to content
Snippets Groups Projects
Commit 4d584d81 authored by Sebastien Harasse's avatar Sebastien Harasse
Browse files

BUG: Region merging: set number of components for clustered output image

parent baeef3ab
No related branches found
No related tags found
No related merge requests found
......@@ -111,6 +111,8 @@ public:
protected:
virtual void GenerateOutputInformation(void);
virtual void GenerateData();
/** Constructor */
......
......@@ -131,6 +131,21 @@ LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabe
return static_cast<OutputClusteredImageType *>(this->itk::ProcessObject::GetOutput(1));
}
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage, class TOutputClusteredImage>
void
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage, TOutputClusteredImage>
::GenerateOutputInformation()
{
Superclass::GenerateOutputInformation();
unsigned int numberOfComponentsPerPixel = this->GetInputSpectralImage()->GetNumberOfComponentsPerPixel();
if(this->GetClusteredOutput())
{
this->GetClusteredOutput()->SetNumberOfComponentsPerPixel(numberOfComponentsPerPixel);
}
}
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage, class TOutputClusteredImage>
void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment