diff --git a/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.txx b/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.txx index 3f7f073481109291b9f36e97857d28851ed37ed3..660bb06715de57027bf6944445e622ef6e5003b0 100644 --- a/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.txx +++ b/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.txx @@ -125,7 +125,7 @@ NeighborhoodScalarProductFilter<TInputImage,TOutputModulus,TOutputDirection> // Compute the scalar product scalarCurrentValue = -(pixel1[0]*pixel2[0]+pixel1[1]*pixel2[1]); - + // If the value is upper than the current max value if (scalarCurrentValue > scalarMaxValue) { @@ -146,7 +146,7 @@ NeighborhoodScalarProductFilter<TInputImage,TOutputModulus,TOutputDirection> } } // Compute the direction - double angle = (1+neighborhoodNumberMax) * M_PI_4; + double angle = static_cast<double>((1+neighborhoodNumberMax)) * static_cast<double>(M_PI_4); if (flagPosNegDirection) { angle -= M_PI; diff --git a/Code/FeatureExtraction/otbSiftFastImageFilter.txx b/Code/FeatureExtraction/otbSiftFastImageFilter.txx index 91f36d124197d2ea1e56edeb0a72c11908753164..60f1d0b9ddea89f7b0a761bd30574dc2e9d0628e 100755 --- a/Code/FeatureExtraction/otbSiftFastImageFilter.txx +++ b/Code/FeatureExtraction/otbSiftFastImageFilter.txx @@ -51,12 +51,6 @@ namespace otb rescaler->SetOutputMaximum(1); rescaler->Update(); - typedef otb::ImageFileWriter<FloatImageType> WriterType; - WriterType::Pointer writer = WriterType::New(); - writer->SetInput(rescaler->GetOutput()); - writer->SetFileName("qb_RoadExtract.tif"); - writer->Update(); - SiftFastImage siftInputImage = CreateImage(size[1],size[0]); itk::ImageRegionIterator<FloatImageType> inIt(rescaler->GetOutput(),rescaler->GetOutput()->GetLargestPossibleRegion()); diff --git a/Testing/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.cxx b/Testing/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.cxx index 82330bddcc84e42f751cbc93a0b9231a82ad8d89..fdf8113fd31924672beb022cd55eb37fafd8b9f9 100644 --- a/Testing/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.cxx +++ b/Testing/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.cxx @@ -33,14 +33,14 @@ int otbNeighborhoodScalarProductFilter(int argc, char * argv[]) const unsigned int Dimension = 2; typedef double PixelType; - typedef itk::CovariantVector<PixelType,Dimension> VectorPixelType; - typedef otb::Image<VectorPixelType,Dimension> VectorImageType; - typedef otb::Image<PixelType,Dimension> ImageType; - typedef otb::NeighborhoodScalarProductFilter<VectorImageType,ImageType,ImageType> FilterType; - typedef otb::ImageFileReader<ImageType> ReaderType; - typedef otb::ImageFileWriter<ImageType> WriterType; - typedef otb::ImageFileWriter<VectorImageType> TempWriter; - typedef itk::GradientRecursiveGaussianImageFilter<ImageType,VectorImageType> GradientFilterType; + typedef itk::CovariantVector<PixelType,Dimension> VectorPixelType; + typedef otb::Image<VectorPixelType,Dimension> VectorImageType; + typedef otb::Image<PixelType,Dimension> ImageType; + typedef otb::NeighborhoodScalarProductFilter<VectorImageType,ImageType,ImageType> FilterType; + typedef otb::ImageFileReader<ImageType> ReaderType; + typedef otb::ImageFileWriter<ImageType> WriterType; + typedef otb::ImageFileWriter<VectorImageType> TempWriter; + typedef itk::GradientRecursiveGaussianImageFilter<ImageType,VectorImageType> GradientFilterType; // Instantiating object