Commit 10ddb79f authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

Seam carving testing instanciation

parent 8324daaf
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#if defined(_MSC_VER)
#pragma warning ( disable : 4786 )
#endif
#include "otbImage.h"
#include "otbAddCarvingPathFilter.h"
#include "itkPolyLineParametricPath.h"
int otbAddCarvingPathFilterNew(int argc, char* argv[])
{
typedef double PixelType;
const unsigned int Dimension = 2;
typedef otb::Image< PixelType, Dimension > InputImageType;
typedef otb::Image< PixelType, Dimension > OutputImageType;
typedef itk::PolyLineParametricPath<Dimension> PathType;
typedef otb::AddCarvingPathFilter<InputImageType, PathType,
OutputImageType> AddCarvingPathFilterType;
try
{
AddCarvingPathFilterType::Pointer addCarvingPathFilter = AddCarvingPathFilterType::New();
}
catch( itk::ExceptionObject & err )
{
std::cerr << "itk::Exception detected: " << err.GetDescription();
return EXIT_FAILURE;
}
catch( ... )
{
std::cout << "unknown exception detected !" << std::endl;
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#if defined(_MSC_VER)
#pragma warning ( disable : 4786 )
#endif
#include "otbImage.h"
#include "otbImageToCarvingPathFilter.h"
#include "itkPolyLineParametricPath.h"
int otbImageToCarvingPathFilterNew(int argc, char* argv[])
{
typedef double PixelType;
const unsigned int Dimension = 2;
typedef otb::Image< PixelType, Dimension > InputImageType;
typedef itk::PolyLineParametricPath<Dimension> PathType;
typedef otb::ImageToCarvingPathFilter<InputImageType, PathType> ImageToCarvingPathFilterType;
try
{
ImageToCarvingPathFilterType::Pointer addCarvingPathFilter = ImageToCarvingPathFilterType::New();
}
catch( itk::ExceptionObject & err )
{
std::cerr << "itk::Exception detected: " << err.GetDescription();
return EXIT_FAILURE;
}
catch( ... )
{
std::cout << "unknown exception detected !" << std::endl;
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#if defined(_MSC_VER)
#pragma warning ( disable : 4786 )
#endif
#include "otbImage.h"
#include "otbRemoveCarvingPathFilter.h"
#include "itkPolyLineParametricPath.h"
int otbRemoveCarvingPathFilterNew(int argc, char* argv[])
{
typedef double PixelType;
const unsigned int Dimension = 2;
typedef otb::Image< PixelType, Dimension > InputImageType;
typedef otb::Image< PixelType, Dimension > OutputImageType;
typedef itk::PolyLineParametricPath<Dimension> PathType;
typedef otb::RemoveCarvingPathFilter<InputImageType, PathType,
OutputImageType> RemoveCarvingPathFilterType;
try
{
RemoveCarvingPathFilterType::Pointer addCarvingPathFilter = RemoveCarvingPathFilterType::New();
}
catch( itk::ExceptionObject & err )
{
std::cerr << "itk::Exception detected: " << err.GetDescription();
return EXIT_FAILURE;
}
catch( ... )
{
std::cout << "unknown exception detected !" << std::endl;
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
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