Skip to content
Snippets Groups Projects
Commit eae92ef2 authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

TEST: add test for AmplitudePhaseToRGBFunctor

parent 830e52b5
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,8 @@
#include "itkBinaryFunctorImageFilter.h"
#include "otbAmplitudePhaseToRGBFunctor.h"
#include "itkComplexToModulusImageFilter.h"
#include "itkComplexToPhaseImageFilter.h"
int otbAmplitudePhaseToRGBFunctor(int argc, char * argv[])
{
......@@ -63,17 +65,17 @@ int otbAmplitudePhaseToRGBFunctor(int argc, char * argv[])
phaseFilter->SetInput(reader->GetOutput());
typedef otb::Functor::AmplitudePhaseToRGBFunctor<PixelType,PixelType,RGBPixelType>
ColorMapFunctorType;
typedef itk::BinaryFunctorImageFilter<ImageType,
RGBImageType, ColorMapFunctorType> ColorMapFilterType;
typedef otb::Functor::AmplitudePhaseToRGBFunctor
<PixelType,PixelType,RGBPixelType> ColorMapFunctorType;
typedef itk::BinaryFunctorImageFilter
<ImageType, ImageType, RGBImageType, ColorMapFunctorType> ColorMapFilterType;
ColorMapFilterType::Pointer colormapper = ColorMapFilterType::New();
colormapper->GetFunctor().SetMaximum(150);
colormapper->GetFunctor().SetMinimum(70);
colormapper->SetInput1(modulus->GetOutput());
colormapper->SetInput2(phase->GetOutput());
colormapper->SetInput1(modulusFilter->GetOutput());
colormapper->SetInput2(phaseFilter->GetOutput());
writer->SetInput(colormapper->GetOutput());
......
......@@ -28,21 +28,22 @@
#include "otbImage.h"
#include "itkUnaryFunctorImageFilter.h"
#include "itkBinaryFunctorImageFilter.h"
#include "otbAmplitudePhaseToRGBFunctor.h"
int otbFunctorNew(int argc, char * argv[])
{
typedef unsigned char PixelType;
typedef itk::RGBPixel<PixelType> RGBPixelType;
typedef double PixelType;
typedef otb::Image<PixelType, 2> ImageType;
typedef itk::RGBPixel<unsigned char> RGBPixelType;
typedef otb::Image<RGBPixelType, 2> RGBImageType;
typedef otb::Functor::AmplitudePhaseToRGBFunctor<PixelType>
ColorMapFunctorType;
typedef itk::UnaryFunctorImageFilter<ImageType,
RGBImageType, ColorMapFunctorType> ColorMapFilterType;
typedef otb::Functor::AmplitudePhaseToRGBFunctor
<PixelType,PixelType,RGBPixelType> ColorMapFunctorType;
typedef itk::BinaryFunctorImageFilter
<ImageType, ImageType, RGBImageType, ColorMapFunctorType> ColorMapFilterType;
ColorMapFilterType::Pointer colormapper = ColorMapFilterType::New();
colormapper->GetFunctor().SetMaximum(150);
colormapper->GetFunctor().SetMinimum(70);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment