Commit 61968377 authored by Jordi Inglada's avatar Jordi Inglada

MRG

parents e7bdba35 82d7a532
......@@ -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;
......
......@@ -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());
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment