diff --git a/Code/Common/otbDrawPathFilter.h b/Code/Common/otbDrawPathFilter.h index a762912b0f3971f9ed22ad602867e97a57990bc8..cfd27f0c11bcbe56ab5da2cabee87acb28b5bfbe 100644 --- a/Code/Common/otbDrawPathFilter.h +++ b/Code/Common/otbDrawPathFilter.h @@ -78,6 +78,12 @@ public: itkSetMacro(Value, OutputImagePixelType); itkGetConstReferenceMacro(Value, OutputImagePixelType); + /** Set/Get the path input of this process object. + Note: these methods are adding to get the proper name */ + void SetInputPath( const TInputPath * path); + + const TInputPath * GetInputPath(void); + protected: DrawPathFilter(); virtual ~DrawPathFilter() {}; diff --git a/Code/Common/otbDrawPathFilter.txx b/Code/Common/otbDrawPathFilter.txx index 7d1ca13fb7752db2fb73ec3e2bf7a99ca53d9b87..ad7c3186ab6e7240d66a2352c7d4a1cd71484de2 100644 --- a/Code/Common/otbDrawPathFilter.txx +++ b/Code/Common/otbDrawPathFilter.txx @@ -33,6 +33,23 @@ DrawPathFilter<TInputImage,TInputPath,TOutputImage> { m_Value = static_cast<OutputImagePixelType>(255.0); } + +template <class TInputImage, class TInputPath,class TOutputImage> +inline void DrawPathFilter<TInputImage,TInputPath,TOutputImage> +::SetInputPath( const TInputPath * path) +{ + this->SetPathInput(path); +} + + +template <class TInputImage, class TInputPath,class TOutputImage> +const TInputPath * DrawPathFilter<TInputImage,TInputPath,TOutputImage> + ::GetInputPath(void) +{ + return this->GetPathInput(); +} + + /** * Main computation method. */ diff --git a/Examples/FeatureExtraction/AlignmentsExample.cxx b/Examples/FeatureExtraction/AlignmentsExample.cxx index fe87abac6d3cdb18c2859d8077ca28fdc2e389f9..40a6537f3c4c9828b177f3d74e3b1f0e585c3478 100644 --- a/Examples/FeatureExtraction/AlignmentsExample.cxx +++ b/Examples/FeatureExtraction/AlignmentsExample.cxx @@ -200,7 +200,7 @@ int main( int argc, char *argv[] ) DrawPathFilterType::Pointer drawPathFilter = DrawPathFilterType::New(); drawPathFilter->SetImageInput( backgroundImage ); - drawPathFilter->SetPathInput( listIt.Get() ); + drawPathFilter->SetInputPath( listIt.Get() ); drawPathFilter->SetValue( itk::NumericTraits<OutputPixelType>::max() ); drawPathFilter->Update(); diff --git a/Examples/FeatureExtraction/SeamCarvingExample.cxx b/Examples/FeatureExtraction/SeamCarvingExample.cxx index 68cbb6b693b2bd7528931ad7ef284d44da230c20..6ad1fcaae88d51230de467f39332142ef8b9e414 100644 --- a/Examples/FeatureExtraction/SeamCarvingExample.cxx +++ b/Examples/FeatureExtraction/SeamCarvingExample.cxx @@ -191,14 +191,14 @@ int main(int argc, char * argv[]) if (energyVert < energyHor) { removeCarvingPath->SetInput( duplicator->GetOutput() ); - removeCarvingPath->SetPathInput( carvingFilterVert->GetOutput() ); + removeCarvingPath->SetInputPath( carvingFilterVert->GetOutput() ); removeCarvingPath->SetDirection(0); removeCarvingPath->UpdateLargestPossibleRegion(); } else { removeCarvingPath->SetInput( duplicator->GetOutput() ); - removeCarvingPath->SetPathInput( carvingFilterHor->GetOutput() ); + removeCarvingPath->SetInputPath( carvingFilterHor->GetOutput() ); removeCarvingPath->SetDirection(1); removeCarvingPath->UpdateLargestPossibleRegion(); } diff --git a/Examples/FeatureExtraction/SeamCarvingOtherExample.cxx b/Examples/FeatureExtraction/SeamCarvingOtherExample.cxx index b662f4099f65328d6047b1e3cd0dba8d13cdd997..bd6ca9a40c9ff60faac78e6c209cde19ac91aad0 100644 --- a/Examples/FeatureExtraction/SeamCarvingOtherExample.cxx +++ b/Examples/FeatureExtraction/SeamCarvingOtherExample.cxx @@ -151,7 +151,7 @@ int main(int argc, char * argv[]) carvingFilter->SetDirection(i%2); removeCarvingPath->SetInput( duplicator->GetOutput() ); - removeCarvingPath->SetPathInput( carvingFilter->GetOutput() ); + removeCarvingPath->SetInputPath( carvingFilter->GetOutput() ); removeCarvingPath->SetDirection(i%2); removeCarvingPath->UpdateLargestPossibleRegion(); @@ -180,12 +180,12 @@ int main(int argc, char * argv[]) { addCarvingPath->SetInput( duplicator->GetOutput() ); - addCarvingPath->SetPathInput( pathList->GetNthElement(i) ); + addCarvingPath->SetInputPath( pathList->GetNthElement(i) ); addCarvingPath->SetDirection(i%2); addCarvingPath->UpdateLargestPossibleRegion(); drawPathFilter->SetInput( addCarvingPath->GetOutput() ); - drawPathFilter->SetPathInput( pathList->GetNthElement(i) ); + drawPathFilter->SetInputPath( pathList->GetNthElement(i) ); drawPathFilter->UpdateLargestPossibleRegion(); duplicator->SetInputImage(drawPathFilter->GetOutput()); diff --git a/Testing/Code/Common/otbDrawPathFilter.cxx b/Testing/Code/Common/otbDrawPathFilter.cxx index 864a689621a0b83e8d8a7dc50402829f0f0186cc..685c15585f044872e2ed78ce00ea2291639e3834 100644 --- a/Testing/Code/Common/otbDrawPathFilter.cxx +++ b/Testing/Code/Common/otbDrawPathFilter.cxx @@ -80,7 +80,7 @@ int otbDrawPathFilter(int argc, char * argv[]) DrawPathFilterType::Pointer filter = DrawPathFilterType::New(); filter->SetImageInput(image); - filter->SetPathInput(path); + filter->SetInputPath(path); WriterType::Pointer writer = WriterType::New(); writer->SetInput(filter->GetOutput()); diff --git a/Testing/Code/FeatureExtraction/otbDrawPath.cxx b/Testing/Code/FeatureExtraction/otbDrawPath.cxx index 75ec152a6a7b82b40515380a27ba973fbb2bd7bd..fff1f1e5840086451a77fad958ca1fa810c77ede 100644 --- a/Testing/Code/FeatureExtraction/otbDrawPath.cxx +++ b/Testing/Code/FeatureExtraction/otbDrawPath.cxx @@ -98,7 +98,7 @@ int otbDrawPathDessinCarre( int argc, char * argv[] ) DrawPathFilterType::Pointer DrawPath = DrawPathFilterType::New(); DrawPath->SetImageInput( reader->GetOutput() ); - DrawPath->SetPathInput( VertexList ); + DrawPath->SetInputPath( VertexList ); writer->SetInput(DrawPath->GetOutput()); writer->Update(); diff --git a/Testing/Fa/AlignementsQB.cxx b/Testing/Fa/AlignementsQB.cxx index 00a962f50551091528174c076aa3667aaa79b5aa..34a12e1630e44e2284dceb0cbac404cc6a1afc65 100644 --- a/Testing/Fa/AlignementsQB.cxx +++ b/Testing/Fa/AlignementsQB.cxx @@ -115,7 +115,7 @@ int main( int argc, char ** argv ) { drawPathFilter->SetImageInput( backgroundImage ); - drawPathFilter->SetPathInput(listIt.Get()); + drawPathFilter->SetInputPath(listIt.Get()); //drawPathFilter->SetPathValue( color ); drawPathFilter->Update();