diff --git a/Code/Common/otbDrawPathFilter.h b/Code/Common/otbDrawPathFilter.h index 5988e7fb43f077cdc9cb495c915072c0dd3d5fe9..15aece7946420d392f1e155f84c4c2c6a0a726c9 100644 --- a/Code/Common/otbDrawPathFilter.h +++ b/Code/Common/otbDrawPathFilter.h @@ -62,8 +62,9 @@ public: typedef typename OutputImageType::ValueType OutputImageValueType; -// itkSetMacro(PathValue, OutputImagePixelType); -// itkGetConstReferenceMacro(PathValue, OutputImagePixelType); +//OTB-FA-00011-CS + itkSetMacro(Value, OutputImagePixelType); + itkGetConstReferenceMacro(Value, OutputImagePixelType); protected: DrawPathFilter(); @@ -76,7 +77,7 @@ private: DrawPathFilter(const Self&); //purposely not implemented void operator=(const Self&); //purposely not implemented - OutputImagePixelType m_PathValue; + OutputImagePixelType m_Value; diff --git a/Code/Common/otbDrawPathFilter.txx b/Code/Common/otbDrawPathFilter.txx index f0840bc6556598cc1cb403595f270ba25157652e..37d426d321d50c4a16ce339af88262cab75bf68c 100644 --- a/Code/Common/otbDrawPathFilter.txx +++ b/Code/Common/otbDrawPathFilter.txx @@ -30,7 +30,8 @@ template <class TInputImage, class TInputPath,class TOutputImage> DrawPathFilter<TInputImage,TInputPath,TOutputImage> ::DrawPathFilter() { - m_PathValue = static_cast<OutputImagePixelType>(250.0); +//OTB-FA-00011-CS + m_Value = static_cast<OutputImagePixelType>(250.0); } @@ -110,7 +111,8 @@ DrawPathFilter<TInputImage,TInputPath,TOutputImage> IndexOut[1] = static_cast<int>(Alpha * (j-x1) + y1) ; if(IndexOut[0]>=0 && IndexOut[0]<Taille[0] && IndexOut[1]>=0 && IndexOut[1]<Taille[1]) - OutputImage->SetPixel(IndexOut,m_PathValue); +//OTB-FA-00010-CS + OutputImage->SetPixel(IndexOut,m_Value); } } else @@ -122,7 +124,8 @@ DrawPathFilter<TInputImage,TInputPath,TOutputImage> IndexOut[1] = static_cast<int>(j); if(IndexOut[0]>=0 && IndexOut[0]<Taille[0] && IndexOut[1]>=0 && IndexOut[1]<Taille[1]) - OutputImage->SetPixel(IndexOut,m_PathValue); +//OTB-FA-00010-CS + OutputImage->SetPixel(IndexOut,m_Value); } } @@ -137,7 +140,8 @@ DrawPathFilter<TInputImage,TInputPath,TOutputImage> IndexOut[0]=static_cast<int>(j); if(IndexOut[0]>=0 && IndexOut[0]<Taille[0] && IndexOut[1]>=0 && IndexOut[1]<Taille[1]) - OutputImage->SetPixel(IndexOut,m_PathValue); +//OTB-FA-00010-CS + OutputImage->SetPixel(IndexOut,m_Value); } } @@ -150,7 +154,8 @@ DrawPathFilter<TInputImage,TInputPath,TOutputImage> IndexOut[1]=static_cast<int>(j); if( (IndexOut[0]>=0) && (IndexOut[0]<Taille[0]) && (IndexOut[1]>=0) && (IndexOut[1]<Taille[1])) - OutputImage->SetPixel(IndexOut,m_PathValue); +//OTB-FA-00010-CS + OutputImage->SetPixel(IndexOut,m_Value); } } } @@ -168,7 +173,8 @@ DrawPathFilter<TInputImage,TInputPath,TOutputImage> ::PrintSelf(std::ostream& os, itk::Indent indent) const { Superclass::PrintSelf(os, indent); - os << indent << "Path Value: " << m_PathValue << std::endl; +//OTB-FA-00010-CS + os << indent << "Path Value: " << m_Value << std::endl; } diff --git a/Code/Common/otbImageToPathListFilter.h b/Code/Common/otbImageToPathListFilter.h index 9b989c894067f64c366291e05f2ea3d56b024507..1a49eb876737b6c93ec352b77fb224d88d98ef76 100644 --- a/Code/Common/otbImageToPathListFilter.h +++ b/Code/Common/otbImageToPathListFilter.h @@ -57,8 +57,9 @@ public: TInputImage::ImageDimension); /** Set/Get the image input of this process object. */ - virtual void SetImageInput( const InputImageType * image); - const InputImageType * GetImageInput(void); +//OTB-FA-00010-CS + virtual void SetInput( const InputImageType * image); + const InputImageType * GetInput(void); protected: ImageToPathListFilter(); diff --git a/Code/Common/otbImageToPathListFilter.txx b/Code/Common/otbImageToPathListFilter.txx index 13cf1e882c5c1487f5e0802c28b5f84b732f9177..02af170823711f0c1f8bcc292b52ded0525d515f 100644 --- a/Code/Common/otbImageToPathListFilter.txx +++ b/Code/Common/otbImageToPathListFilter.txx @@ -36,7 +36,8 @@ ImageToPathListFilter<TInputImage,TOutputPath> template <class TInputImage, class TOutputPath> void ImageToPathListFilter<TInputImage,TOutputPath> -::SetImageInput(const InputImageType *image) +//OTB-FA-00010-CS +::SetInput(const InputImageType *image) { // We have 1 input: an image @@ -48,7 +49,8 @@ ImageToPathListFilter<TInputImage,TOutputPath> template <class TInputImage, class TOutputPath> const typename ImageToPathListFilter<TInputImage,TOutputPath>::InputImageType * ImageToPathListFilter<TInputImage,TOutputPath> -::GetImageInput(void) +//OTB-FA-00010-CS +::GetInput(void) { if (this->GetNumberOfInputs() < 1) { diff --git a/Code/FeatureExtraction/otbImageToPathListAlignFilter.h b/Code/FeatureExtraction/otbImageToPathListAlignFilter.h index 6e0eb5f61959e46eab1cc57621b3b8db28c1a8a7..06b44b368f50faba6315c6c954029a864e74679d 100644 --- a/Code/FeatureExtraction/otbImageToPathListAlignFilter.h +++ b/Code/FeatureExtraction/otbImageToPathListAlignFilter.h @@ -117,7 +117,6 @@ protected: virtual void GenerateOutputInformation(){}; // do nothing virtual void GenerateData(); virtual std::vector<double> tab(int n,double p,double m); -// virtual void AngleCalculate(InputImageConstPointer ImageIn,RealImagePointer ImageOut); virtual void AngleCalculate( const InputImageType* InputImageIn,RealImageTypePointer AngleImage); SizeType m_Size; diff --git a/Code/FeatureExtraction/otbImageToPathListAlignFilter.txx b/Code/FeatureExtraction/otbImageToPathListAlignFilter.txx index 33935330a378828c942b695f9407d43c822047b3..8bf99ba313a2e83cc1d9a00a98b7ef6d48557022 100644 --- a/Code/FeatureExtraction/otbImageToPathListAlignFilter.txx +++ b/Code/FeatureExtraction/otbImageToPathListAlignFilter.txx @@ -325,7 +325,8 @@ ImageToPathListAlignFilter<TInputImage,TOutputPath> // Get the input and output pointers - const InputImageType * InputImage = this->GetImageInput(); +//OTB-FA-00010-CS + const InputImageType * InputImage = this->GetInput(); OutputPathListType * OutputPath = this->GetOutput(); // Generate the image diff --git a/Testing/Code/FeatureExtraction/otbAlignImageToPath.cxx b/Testing/Code/FeatureExtraction/otbAlignImageToPath.cxx index e2491baf1f8a715e385b3ae679b7d08663730809..a64985d790746dbf3e70e7d3d38d6ea354a255cf 100644 --- a/Testing/Code/FeatureExtraction/otbAlignImageToPath.cxx +++ b/Testing/Code/FeatureExtraction/otbAlignImageToPath.cxx @@ -42,27 +42,16 @@ int otbAlignImageToPath( int argc, char ** argv ) typedef unsigned char InputPixelType; typedef unsigned char OutputPixelType; -// typedef float PathType; typedef float RealPixelType; const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< RealPixelType, Dimension > RealImageType; -// typedef itk::Path< double, itk::ContinuousIndex< double , Dimension > , Dimension > PathType; - typedef itk::PolyLineParametricPath< Dimension > PathType; -// typedef itk::ParametricPath< Dimension > PathType; + typedef itk::PolyLineParametricPath< Dimension > PathType; + typedef PathType::Pointer PathTypePointer; -// PathType ltoto; PathType::Pointer ltoto = PathType::New(); - -/* typedef otb::ImageToPathAlignExtract<itk::Image< InputPixelType, Dimension > ,PathType> OutputPathType; - typedef OutputPathType::InputImageType InputImageType; -*/ -// typedef otb::PathListSource<PathType> PathListSourceType; -// PathListSourceType::Pointer PathSourceList = PathListSourceType::New(); - - typedef itk::Image< OutputPixelType, Dimension > OutputImageType; @@ -74,17 +63,14 @@ int otbAlignImageToPath( int argc, char ** argv ) ReaderType::Pointer reader = ReaderType::New(); WriterType::Pointer writer = WriterType::New(); InputImageType::Pointer ImageIn = InputImageType::New(); -// ListAlignFilterType::Pointer Align = ListAlignFilterType::New(); - -// typedef itk::PathSource<PathType> TestType; -// TestType::Pointer test = TestType::New(); typedef otb::ImageToPathListAlignFilter<InputImageType,PathType> TestType; TestType::Pointer testList = TestType::New(); reader->SetFileName( inputFilename ); - testList->SetImageInput( reader->GetOutput() ); +//OTB-FA-00010-CS + testList->SetInput( reader->GetOutput() ); typedef ListAlignFilterType::OutputPathListType ListAlignFilterOutputPathListType; @@ -101,13 +87,11 @@ int otbAlignImageToPath( int argc, char ** argv ) fprintf(stderr,"Erreur dans l'ouverture du fichier"); exit(-1); } -// typename InputImageType::PointType PointType; typedef itk::ContinuousIndex< double,2> VertexType; typedef itk::VectorContainer< unsigned,VertexType > VertexListType; typedef VertexListType::ConstPointer VertexListTypePointer; VertexListTypePointer vertexList; VertexType cindex; -// PointType::Pointer point; double x1,y1,x2,y2; int nbPath = sortiePath->size(); @@ -140,9 +124,6 @@ int otbAlignImageToPath( int argc, char ** argv ) std::cout << "Exception levee inconnue !" << std::endl; return EXIT_FAILURE; } - // Software Guide : EndCodeSnippet - -//#endif return EXIT_SUCCESS; } diff --git a/Testing/Code/FeatureExtraction/otbDrawPathAlign.cxx b/Testing/Code/FeatureExtraction/otbDrawPathAlign.cxx index e3c2b128777178e9310be33665127acc0206d2a8..57dbbda04e3eeaeba9258f0d01fa69ca6225e8e6 100644 --- a/Testing/Code/FeatureExtraction/otbDrawPathAlign.cxx +++ b/Testing/Code/FeatureExtraction/otbDrawPathAlign.cxx @@ -64,7 +64,9 @@ int otbDrawPathAlign( int argc, char ** argv ) typedef otb::ImageToPathListAlignFilter<InputImageType,PathType> PathListAlignType; PathListAlignType::Pointer testList = PathListAlignType::New(); - testList->SetImageInput( reader->GetOutput() ); + +//OTB-FA-00010-CS + testList->SetInput( reader->GetOutput() ); testList->Update(); OutputPathListType * sortiePath = testList->GetOutput(); diff --git a/Testing/Code/FeatureExtraction/otbDrawPathList.cxx b/Testing/Code/FeatureExtraction/otbDrawPathList.cxx index 6d99fa5f20fefc5310891d7b9eda577d1947efb6..69a26ee8649b7560da50d4ce69f8e890664ce96b 100644 --- a/Testing/Code/FeatureExtraction/otbDrawPathList.cxx +++ b/Testing/Code/FeatureExtraction/otbDrawPathList.cxx @@ -229,12 +229,12 @@ int otbDrawPathList( int argc, char ** argv ) reader->SetFileName( inputFilename ); writer->SetFileName( outputFilename ); - testList->SetImageInput( reader->GetOutput() ); +//OTB-FA-00010-CS + testList->SetInput( reader->GetOutput() ); testList->Update(); DrawPath->SetImageInput(reader->GetOutput() ); DrawPath->SetPathInput( testList->GetOutput()); -// DrawPath->SetImageOutput(); DrawPath->Update(); writer->SetInput(DrawPath->GetImageOutput());