Skip to content
Snippets Groups Projects
Commit 088f1fb1 authored by Jordi Inglada's avatar Jordi Inglada
Browse files

ENH: change TextureExample from fucntion to functor

parent d997c422
No related branches found
No related tags found
No related merge requests found
......@@ -40,8 +40,7 @@
#include "otbTextureFunctors.h"
#include "otbFunctionWithNeighborhoodToImageFilter.h"
#include "otbTextureImageFunction.h"
#include "otbUnaryFunctorNeighborhoodWithOffsetImageFilter.h"
int main(int argc, char * argv[])
......@@ -71,9 +70,9 @@ int main(int argc, char * argv[])
typedef itk::ConstNeighborhoodIterator<ImageType> IteratorType;
typedef otb::Functor::ContrastTextureFunctor<PixelType, PixelType> FunctorType;
typedef otb::TextureImageFunction<ImageType, FunctorType> FunctionType;
typedef otb::FunctionWithNeighborhoodToImageFilter<ImageType,
ImageType, FunctionType> FilterType;
typedef otb::UnaryFunctorNeighborhoodWithOffsetImageFilter<ImageType,
ImageType, FunctorType> FilterType;
typedef ImageType::OffsetType OffsetType;
typedef otb::ImageFileReader<ImageType> ReaderType;
typedef otb::ImageFileWriter<ImageType> WriterType;
......@@ -88,10 +87,7 @@ int main(int argc, char * argv[])
writer->SetFileName(outfname);
textureFilter->SetInput(reader->GetOutput());
ImageType::SizeType tRadius;
tRadius[0] = radius;
tRadius[1] = radius;
textureFilter->SetRadius(tRadius);
textureFilter->SetRadius(radius);
OffsetType offset;
offset[0] = xOffset;
offset[1] = yOffset;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment