21 #ifndef otbEdgeDetectorImageFilter_hxx
22 #define otbEdgeDetectorImageFilter_hxx
31 template <
class TInputImage,
class TOutputImage,
class TEdgeDetection>
34 this->SetNumberOfRequiredInputs(1);
36 m_Detector = DetectionType::New();
37 m_BinaryFilter = BinaryFilterType::New();
38 m_BinaryFilter->SetInsideValue(
static_cast<OutputImagePixelType
>(0.));
39 m_BinaryFilter->SetOutsideValue(
static_cast<OutputImagePixelType
>(1.));
40 m_BinaryFilter->SetUpperThreshold(
static_cast<InputImagePixelType
>(255));
41 m_BinaryFilter->SetLowerThreshold(
static_cast<InputImagePixelType
>(0));
47 template <
class TInputImage,
class TOutputImage,
class TEdgeDetection>
55 template <
class TInputImage,
class TOutputImage,
class TEdgeDetection>
58 m_Detector->SetInput(this->GetInput());
62 m_BinaryFilter->SetInput(m_Detector->GetOutput());
63 m_BinaryFilter->GraftOutput(this->GetOutput());
64 m_BinaryFilter->Update();
65 this->GraftOutput(m_BinaryFilter->GetOutput());
71 template <
class TInputImage,
class TOutputImage,
class TEdgeDetection>
74 Superclass::PrintSelf(os, indent);