Commit a534ee87 authored by Julien Michel's avatar Julien Michel

TEST: Remove all new tests embedded in cxx files that were not named *New.cxx

parent 2f6dcdae
......@@ -16,16 +16,6 @@ A simple example is given below:
#include "otbBandMathImageFilterX.h"
#include "otbVectorImage.h"
int otbBandMathImageFilterXNew( int itkNotUsed(argc), char* itkNotUsed(argv) [])
{
typedef double PixelType;
typedef otb::VectorImage<PixelType, 2> ImageType;
typedef otb::BandMathImageFilterX<ImageType> FilterType;
FilterType::Pointer filter = FilterType::New();
return EXIT_SUCCESS;
}
As we can see, the new band math filter works with the class
otb::VectorImage.
......
......@@ -27,14 +27,6 @@ typedef SplitterType::RegionType RegionType;
typedef RegionType::SizeType SizeType;
typedef RegionType::IndexType IndexType;
int otbImageRegionAdaptativeSplitterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
{
SplitterType::Pointer splitter = SplitterType::New();
std::cout<<splitter<<std::endl;
return EXIT_SUCCESS;
}
int otbImageRegionAdaptativeSplitter(int itkNotUsed(argc), char * argv[])
{
......
......@@ -28,14 +28,6 @@ typedef SquareTileSplitterType::SizeType SizeType;
typedef SquareTileSplitterType::RegionType RegionType;
int otbImageRegionSquareTileSplitterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
{
SquareTileSplitterType::Pointer splitter = SquareTileSplitterType::New();
std::cout << splitter << std::endl;
return EXIT_SUCCESS;
}
int TestSplitter(const RegionType& region, unsigned int PixelSize, unsigned int MaxTileSize, std::ostream& os)
{
......
......@@ -24,31 +24,6 @@
#include "otbRGBAPixelConverter.h"
int otbRGBAPixelConverterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
{
typedef unsigned char PixelType0;
typedef double PixelType1;
typedef itk::RGBAPixel<unsigned char> PixelType2;
typedef itk::RGBPixel<double> PixelType3;
typedef otb::RGBAPixelConverter<PixelType0, PixelType0> ConverterType0;
typedef otb::RGBAPixelConverter<PixelType1, PixelType1> ConverterType1;
typedef otb::RGBAPixelConverter<PixelType0, PixelType2> ConverterType2;
typedef otb::RGBAPixelConverter<PixelType0, PixelType3> ConverterType3;
// Instantiating object
ConverterType0::Pointer converter0 = ConverterType0::New();
ConverterType1::Pointer converter1 = ConverterType1::New();
ConverterType2::Pointer converter2 = ConverterType2::New();
ConverterType3::Pointer converter3 = ConverterType3::New();
std::cout << converter0 << std::endl;
std::cout << converter1 << std::endl;
std::cout << converter2 << std::endl;
std::cout << converter3 << std::endl;
return EXIT_SUCCESS;
}
int otbRGBAPixelConverter(int itkNotUsed(argc), char * itkNotUsed(argv) [])
{
......
......@@ -25,34 +25,6 @@
#include "otbStandardFilterWatcher.h"
#include "itkGradientMagnitudeImageFilter.h"
int otbStandardFilterWatcherNew(int itkNotUsed(argc), char * argv[])
{
const unsigned int Dimension = 2;
typedef unsigned char PixelType;
typedef otb::Image<PixelType, Dimension> ImageType;
typedef otb::ImageFileReader<ImageType> ReaderType;
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName(argv[1]);
typedef itk::GradientMagnitudeImageFilter<ImageType, ImageType> FilterType;
FilterType::Pointer gradient = FilterType::New();
typedef otb::StandardFilterWatcher WatcherType;
WatcherType watcher1(gradient, "Gradient");
gradient->SetInput(reader->GetOutput());
gradient->Update();
// Test copy constructor.
WatcherType watcher2( watcher1 );
if ( watcher1.GetNameOfClass() != watcher2.GetNameOfClass()
|| watcher1.GetProcess() != watcher2.GetProcess()
|| watcher1.GetComment() != watcher2.GetComment() )
{
std::cout << "Copy constructor failed." << std::endl;
return EXIT_FAILURE;
}
// Test default constructor.
WatcherType watcher3;
......
......@@ -23,34 +23,3 @@
#include "otbVariableLengthVectorConverter.h"
int otbVariableLengthVectorConverterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
{
typedef itk::VariableLengthVector<double> InputType0;
typedef std::vector< std::vector< double > > InputType1;
typedef std::vector< std::vector< std::complex< double > > > InputType2;
typedef itk::FixedArray<double> InputType3;
typedef float PrecisionType;
typedef otb::VariableLengthVectorConverter<InputType0, PrecisionType>
ConverterType0;
typedef otb::VariableLengthVectorConverter<InputType1, PrecisionType>
ConverterType1;
typedef otb::VariableLengthVectorConverter<InputType2, PrecisionType>
ConverterType2;
typedef otb::VariableLengthVectorConverter<InputType3, PrecisionType>
ConverterType3;
// Instantiating object
ConverterType0::Pointer converter0 = ConverterType0::New();
ConverterType1::Pointer converter1 = ConverterType1::New();
ConverterType2::Pointer converter2 = ConverterType2::New();
ConverterType3::Pointer converter3 = ConverterType3::New();
std::cout << converter0 << std::endl;
std::cout << converter1 << std::endl;
std::cout << converter2 << std::endl;
std::cout << converter3 << std::endl;
return EXIT_SUCCESS;
}
......@@ -27,20 +27,6 @@
#include "otbImageFileWriter.h"
int otbComplexToVectorImageCastFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
{
typedef std::complex<float> ComplexType;
typedef otb::VectorImage<ComplexType, 2> CplxImageType;
typedef otb::VectorImage<float, 2> VectorImageType;
typedef otb::ComplexToVectorImageCastFilter<CplxImageType, VectorImageType> FilterType;
// Instantiating object
FilterType::Pointer caster = FilterType::New();
return EXIT_SUCCESS;
}
int otbComplexToVectorImageCastFilterTest(int itkNotUsed(argc), char * argv[])
{
......
......@@ -35,48 +35,6 @@
#include "otbLocalHistogramImageFunction.h"
int otbImageFunctionAdaptorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
{
typedef double InputPixelType;
typedef double PrecisionType;
const unsigned int Dimension = 2;
typedef otb::Image<InputPixelType, Dimension> InputImageType;
typedef otb::FourierMellinDescriptorsImageFunction<InputImageType> FMDFunctionType;
typedef otb::RealMomentsImageFunction<InputImageType> RMFunctionType;
typedef otb::ComplexMomentsImageFunction<InputImageType> CMFunctionType;
typedef otb::FlusserMomentsImageFunction<InputImageType> FMFunctionType;
typedef otb::HuMomentsImageFunction<InputImageType> HMFunctionType;
typedef otb::RadiometricMomentsImageFunction<InputImageType> RaMFunctionType;
typedef otb::LocalHistogramImageFunction<InputImageType> LHFunctionType;
typedef otb::ImageFunctionAdaptor<FMDFunctionType, PrecisionType> FMDImageFunctionAdaptorType;
typedef otb::ImageFunctionAdaptor<RMFunctionType, PrecisionType> RMImageFunctionAdaptorType;
typedef otb::ImageFunctionAdaptor<CMFunctionType, PrecisionType> CMImageFunctionAdaptorType;
typedef otb::ImageFunctionAdaptor<FMFunctionType, PrecisionType> FMImageFunctionAdaptorType;
typedef otb::ImageFunctionAdaptor<HMFunctionType, PrecisionType> HMImageFunctionAdaptorType;
typedef otb::ImageFunctionAdaptor<RaMFunctionType, PrecisionType> RaMImageFunctionAdaptorType;
typedef otb::ImageFunctionAdaptor<LHFunctionType, PrecisionType> LHImageFunctionAdaptorType;
// Instantiating objects
FMDImageFunctionAdaptorType::Pointer FMDadaptedFunction = FMDImageFunctionAdaptorType::New();
std::cout << FMDadaptedFunction << std::endl;
RMImageFunctionAdaptorType::Pointer RMadaptedFunction = RMImageFunctionAdaptorType::New();
std::cout << RMadaptedFunction << std::endl;
CMImageFunctionAdaptorType::Pointer CMadaptedFunction = CMImageFunctionAdaptorType::New();
std::cout << CMadaptedFunction << std::endl;
FMImageFunctionAdaptorType::Pointer FMadaptedFunction = FMImageFunctionAdaptorType::New();
std::cout << FMadaptedFunction << std::endl;
HMImageFunctionAdaptorType::Pointer HMadaptedFunction = HMImageFunctionAdaptorType::New();
std::cout << HMadaptedFunction << std::endl;
RaMImageFunctionAdaptorType::Pointer RaMadaptedFunction = RaMImageFunctionAdaptorType::New();
std::cout << RaMadaptedFunction << std::endl;
LHImageFunctionAdaptorType::Pointer LHadaptedFunction = LHImageFunctionAdaptorType::New();
std::cout << LHadaptedFunction << std::endl;
return EXIT_SUCCESS;
}
int otbImageFunctionAdaptor(int itkNotUsed(argc), char * argv[])
{
......
......@@ -39,12 +39,6 @@ typedef otb::MetaImageFunction<PrecisionType, double> MetaImageF
typedef MetaImageFunctionType::PointType PointType;
typedef MetaImageFunctionType::OutputType OutputType;
int otbMetaImageFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
{
MetaImageFunctionType::Pointer function = MetaImageFunctionType::New();
return EXIT_SUCCESS;
}
int otbMetaImageFunction(int itkNotUsed(argc), char * argv[])
{
......
......@@ -27,18 +27,6 @@
#include "otbStreamingResampleImageFilter.h"
int otbBCOInterpolateImageFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
{
typedef otb::Image<double, 2> ImageType;
typedef otb::BCOInterpolateImageFunction<ImageType, double> InterpolatorType;
// Instantiating object
InterpolatorType::Pointer interp = InterpolatorType::New();
std::cout << interp << std::endl;
return EXIT_SUCCESS;
}
int otbBCOInterpolateImageFunction(int argc, char * argv[])
{
......@@ -183,16 +171,6 @@ int otbBCOInterpolateImageFunction2(int argc, char * argv[])
int otbBCOInterpolateImageFunctionOverVectorImageNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
{
typedef otb::VectorImage<double, 2> ImageType;
typedef otb::BCOInterpolateImageFunction<ImageType, double> InterpolatorType;
// Instantiating object
InterpolatorType::Pointer filter = InterpolatorType::New();
return EXIT_SUCCESS;
}
int otbBCOInterpolateImageFunctionOverVectorImage(int argc, char * argv[])
......
......@@ -48,11 +48,6 @@ typedef itk::LabelImageToLabelMapFilter<LabeledImageType, LabelMapType>
typedef otb::BandsStatisticsAttributesLabelMapFilter<LabelMapType, VectorImageType> BandsStatisticsFilterType;
int otbBandsStatisticsAttributesLabelMapFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
{
BandsStatisticsFilterType::Pointer object = BandsStatisticsFilterType::New();
return EXIT_SUCCESS;
}
int otbBandsStatisticsAttributesLabelMapFilter(int itkNotUsed(argc), char* argv[])
{
......
......@@ -47,11 +47,6 @@ typedef itk::LabelImageToLabelMapFilter<LabeledImageType, LabelMapType>
typedef otb::ShapeAttributesLabelMapFilter<LabelMapType> ShapeFilterType;
typedef otb::KMeansAttributesLabelMapFilter<LabelMapType> KMeansAttributesLabelMapFilterType;
int otbKMeansAttributesLabelMapFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
{
KMeansAttributesLabelMapFilterType::Pointer radiometricLabelMapFilter = KMeansAttributesLabelMapFilterType::New();
return EXIT_SUCCESS;
}
int otbKMeansAttributesLabelMapFilter(int itkNotUsed(argc), char * argv[])
{
......
......@@ -37,13 +37,6 @@ typedef otb::LabelImageToLabelMapWithAdjacencyFilter
< LabelImageType, LabelMapType> FilterType;
int otbLabelImageToLabelMapWithAdjacencyFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
{
// Instantiation
FilterType::Pointer filter = FilterType::New();
return EXIT_SUCCESS;
}
int otbLabelImageToLabelMapWithAdjacencyFilter(int itkNotUsed(argc), char * argv[])
{
......
......@@ -45,11 +45,6 @@ typedef otb::LabelImageToLabelMapWithAdjacencyFilter<LabeledImageType, LabelMapT
typedef otb::ShapeAttributesLabelMapFilter<LabelMapType> ShapeFilterType;
typedef otb::MinMaxAttributesLabelMapFilter<LabelMapType> MinMaxAttributesLabelMapFilterType;
int otbMinMaxAttributesLabelMapFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
{
MinMaxAttributesLabelMapFilterType::Pointer radiometricLabelMapFilter = MinMaxAttributesLabelMapFilterType::New();
return EXIT_SUCCESS;
}
int otbMinMaxAttributesLabelMapFilter(int itkNotUsed(argc), char * argv[])
{
......
......@@ -47,11 +47,6 @@ typedef otb::ShapeAttributesLabelMapFilter<LabelMapType>
typedef otb::MinMaxAttributesLabelMapFilter<LabelMapType> MinMaxAttributesLabelMapFilterType;
typedef otb::NormalizeAttributesLabelMapFilter<LabelMapType> NormalizeAttributesLabelMapFilterType;
int otbNormalizeAttributesLabelMapFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
{
NormalizeAttributesLabelMapFilterType::Pointer normalizeLabelMapFilter = NormalizeAttributesLabelMapFilterType::New();
return EXIT_SUCCESS;
}
int otbNormalizeAttributesLabelMapFilter(int itkNotUsed(argc), char * argv[])
{
......
......@@ -25,12 +25,6 @@
#include "otbImageFileReader.h"
#include "otbVectorImageToIntensityImageFilter.h"
int otbPipelineMemoryPrintCalculatorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
{
otb::PipelineMemoryPrintCalculator::Pointer calculator = otb::PipelineMemoryPrintCalculator::New();
return EXIT_SUCCESS;
}
int otbPipelineMemoryPrintCalculatorTest(int itkNotUsed(argc), char * argv[])
......
......@@ -52,25 +52,6 @@ ImageType::Pointer makeImage(ImageType::RegionType region)
return image;
}
int otbStreamingManagerNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
{
NbLinesStrippedStreamingManagerType::Pointer streamingManager1 = NbLinesStrippedStreamingManagerType::New();
std::cout << streamingManager1 << std::endl;
RAMDrivenStrippedStreamingManagerType::Pointer streamingManager2 = RAMDrivenStrippedStreamingManagerType::New();
std::cout << streamingManager2 << std::endl;
TileDimensionTiledStreamingManagerType::Pointer streamingManager3 = TileDimensionTiledStreamingManagerType::New();
std::cout << streamingManager3 << std::endl;
RAMDrivenTiledStreamingManagerType::Pointer streamingManager4 = RAMDrivenTiledStreamingManagerType::New();
std::cout << streamingManager4 << std::endl;
RAMDrivenAdaptativeStreamingManagerType::Pointer streamingManager5 = RAMDrivenAdaptativeStreamingManagerType::New();
std::cout<<streamingManager5<<std::endl;
return EXIT_SUCCESS;
}
int otbNumberOfLinesStrippedStreamingManager(int itkNotUsed(argc), char * argv[])
......
......@@ -26,12 +26,6 @@
#include "otbVectorDataFileReader.h"
#include "otbMetaDataKey.h"
int otbVectorDataKeywordlistNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
{
otb::VectorDataKeywordlist kwl;
std::cout << kwl << std::endl;
return EXIT_SUCCESS;
}
int otbVectorDataKeywordlist(int itkNotUsed(argc), char * argv[])
{
......
......@@ -100,15 +100,6 @@ std::ostream &operator<<(std::ostream &stream, SampleEntry entry)
return stream;
}
int otbDescriptorsListSampleGeneratorNew(int itkNotUsed(argc), char* itkNotUsed(argv)[])
{
// instantiation
DescriptorsListSampleGeneratorType::Pointer generator = DescriptorsListSampleGeneratorType::New();
std::cout << generator << std::endl;
return EXIT_SUCCESS;
}
int otbDescriptorsListSampleGenerator(int argc, char* argv[])
{
......
......@@ -24,18 +24,6 @@
#include "otbVectorDataFileWriter.h"
#include "otbLabeledSampleLocalizationGenerator.h"
int otbLabeledSampleLocalizationGeneratorNew(int itkNotUsed(argc), char* itkNotUsed(argv)[])
{
typedef otb::VectorData<> VectorDataType;
typedef otb::LabeledSampleLocalizationGenerator<VectorDataType> GeneratorType;
// instantiation
GeneratorType::Pointer generator = GeneratorType::New();
std::cout << generator << std::endl;
return EXIT_SUCCESS;
}
int otbLabeledSampleLocalizationGenerator(int itkNotUsed(argc), char* argv[])
{
......
......@@ -88,12 +88,6 @@ std::ostream &operator<<(std::ostream &stream, PointType p)
return stream;
}
int otbObjectDetectionClassifierNew(int itkNotUsed(argc), char* itkNotUsed(argv)[])
{
ObjectDetectionClassifierType::Pointer object = ObjectDetectionClassifierType::New();
std::cout << object << std::endl;
return EXIT_SUCCESS;
}
int otbObjectDetectionClassifier(int argc, char* argv[])
......
......@@ -32,18 +32,6 @@
#include "otbHaralickTexturesImageFunction.h"
int otbStandardMetaImageFunctionBuilderNew(int itkNotUsed(argc), char* itkNotUsed(argv)[])
{
typedef double PrecisionType;
typedef otb::StandardMetaImageFunctionBuilder<PrecisionType> BuilderType;
// instantiation
BuilderType::Pointer builder = BuilderType::New();
std::cout << builder << std::endl;
return EXIT_SUCCESS;
}
int otbStandardMetaImageFunctionBuilder(int itkNotUsed(argc), char* argv[])
{
......
......@@ -33,22 +33,6 @@
int otbVectorDataToRoadDescriptionFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
{
typedef double PrecisionType;
typedef otb::VectorData<PrecisionType> VectorDataType;
typedef otb::VectorImage<PrecisionType> ImageType;
typedef otb::VectorDataToRoadDescriptionFilter<VectorDataType, ImageType>
VectorDataToRoadDescriptionFilterType;
VectorDataToRoadDescriptionFilterType::Pointer filter =
VectorDataToRoadDescriptionFilterType::New();
std::cout<<filter<<std::endl;
return EXIT_SUCCESS;
}
int otbVectorDataToRoadDescriptionFilter(int itkNotUsed(argc), char* argv[])
{
......
......@@ -29,19 +29,6 @@
#include "otbImageFileWriter.h"
int otbVectorDataToRightAngleVectorDataFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
{
/** Typedefs */
typedef otb::VectorData< > VectorDataType;
typedef otb::VectorDataToRightAngleVectorDataFilter<VectorDataType>
RightAngleFilterType;
RightAngleFilterType::Pointer filter = RightAngleFilterType::New();
std::cout << filter << std::endl;
return EXIT_SUCCESS;
}
int otbVectorDataToRightAngleVectorDataFilter(int itkNotUsed(argc), char * argv[])
......
......@@ -31,21 +31,6 @@
#include "itkAffineTransform.h"
int otbFourierMellinDescriptorsNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
{
const unsigned int Dimension = 2;
typedef double InputPixelType;
typedef otb::Image<InputPixelType, Dimension> ImageType;
typedef otb::FourierMellinDescriptorsImageFunction<ImageType> FunctionType;
// Instantiating object
FunctionType::Pointer function = FunctionType::New();
std::cout << function << std::endl;
return EXIT_SUCCESS;
}
int otbFourierMellinDescriptors(int itkNotUsed(argc), char * argv[])
{
......
......@@ -41,15 +41,6 @@ typedef GradientFilterType::OutputImageType
typedef otb::HistogramOfOrientedGradientCovariantImageFunction<CovariantImageType> FunctionType;
int otbHistogramOfOrientedGradientCovariantImageFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
{
// Instantiating object
FunctionType::Pointer function = FunctionType::New();
std::cout << function << std::endl;
return EXIT_SUCCESS;
}
int otbHistogramOfOrientedGradientCovariantImageFunction(int itkNotUsed(argc), char * argv[])
......
......@@ -25,22 +25,6 @@
#include "otbVectorDataFileWriter.h"
#include "otbImageFileWriter.h"
int otbLineSegmentDetectorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
{
typedef float InputPixelType;
const unsigned int Dimension = 2;
/** Typedefs */
typedef otb::Image<InputPixelType, Dimension> InputImageType;
typedef otb::LineSegmentDetector<InputImageType, InputPixelType> lsdFilterType;
lsdFilterType::Pointer filter = lsdFilterType::New();
std::cout << filter << std::endl;
return EXIT_SUCCESS;
}
int otbLineSegmentDetector(int argc, char * argv[])
{
......
......@@ -25,21 +25,6 @@
#include "otbVectorDataFileWriter.h"
int otbStreamingLineSegmentDetectorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
{
typedef float InputPixelType;
const unsigned int Dimension = 2;
/** Typedefs */
typedef otb::Image<InputPixelType, Dimension> ImageType;
typedef otb::StreamingLineSegmentDetector<ImageType>::FilterType StreamingLSDFilterType;
StreamingLSDFilterType::Pointer lsdFilter = StreamingLSDFilterType::New();
std::cout << lsdFilter << std::endl;
return EXIT_SUCCESS;
}
int otbStreamingLineSegmentDetector(int itkNotUsed(argc), char * argv[])
{
......
......@@ -32,21 +32,6 @@
#include "otbStreamingResampleImageFilter.h"
int otbComplexMomentsImageFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
{
const unsigned int Dimension = 2;
typedef double InputPixelType;
typedef otb::Image<InputPixelType, Dimension> ImageType;
typedef otb::ComplexMomentsImageFunction<ImageType> FunctionType;
// Instantiating object
FunctionType::Pointer function = FunctionType::New();
std::cout << function << std::endl;
return EXIT_SUCCESS;
}
int otbComplexMomentsImageFunction(int itkNotUsed(argc), char * argv[])
{
......