21 #ifndef otbWatershedSegmentationFilter_hxx
22 #define otbWatershedSegmentationFilter_hxx
29 template <
class TInputImage,
class TOutputLabelImage>
32 m_WatershedFilter = WatershedFilterType::New();
33 m_CastFilter = CastImageFilterType::New();
34 m_CastFilter->SetInput(m_WatershedFilter->GetOutput());
35 this->SetNthOutput(0, TOutputLabelImage::New());
38 template <
class TInputImage,
class TOutputLabelImage>
44 template <
class TInputImage,
class TOutputLabelImage>
47 this->m_WatershedFilter->SetInput(this->GetInput());
48 m_CastFilter->GraftOutput(this->GetOutput());
49 m_CastFilter->Update();
50 this->GraftOutput(m_CastFilter->GetOutput());
55 this->GetOutput()->CopyInformation(this->GetInput());