Commit 74cad136 authored by Thomas Feuvrier's avatar Thomas Feuvrier
Browse files

MAJ via l'implémentation de l'écriture GDAL

Suppression de la CAI
parent ad83dd5a
......@@ -27,9 +27,11 @@
#include "itkNumericTraits.h"
#include "itkMultiThreader.h"
#include "itkImage.h"
//#include "itkImageFileReader.h"
#include "otbImageFileReader.h"
#include "itkImageFileWriter.h"
//THOMAS
#include "otbImageFileWriter.h"
#include "itkImageRegionConstIterator.h"
#include "itkSubtractImageFilter.h"
#include "itkRescaleIntensityImageFilter.h"
......@@ -151,7 +153,7 @@ int main(int ac, char* av[] )
{
// Invoke the test's "main" function.
result = (*f)(ac-1, av+1);
otbMsgDebugMacro(<<"---------------- DEBUT Controle NON-REGRESION ------------------- ");
// Make a list of possible baselines
// Test de non regression sur des images
if (baselineFilenameImage && testFilenameImage)
......@@ -225,6 +227,8 @@ int main(int ac, char* av[] )
result += baseline->second;
}
otbMsgDebugMacro(<<"---------------- FIN Controle NON-REGRESION ------------------- ");
}
catch(const itk::ExceptionObject& e)
{
......@@ -339,7 +343,6 @@ int RegressionTestImage (const char *testImageFilename, const char *baselineImag
typedef itk::Image<double,ITK_TEST_DIMENSION_MAX> ImageType;
typedef itk::Image<unsigned char,ITK_TEST_DIMENSION_MAX> OutputType;
typedef itk::Image<unsigned char,2> DiffOutputType;
// typedef itk::ImageFileReader<ImageType> ReaderType;
typedef otb::ImageFileReader<ImageType> ReaderType;
// Read the baseline file
......@@ -385,7 +388,7 @@ int RegressionTestImage (const char *testImageFilename, const char *baselineImag
}
std::cout << " (RegressionTestImage DifferenceThreshold : "<<toleranceDiffPixelImage<<")"<<std::endl;
otbMsgDebugMacro(<< "RegressionTestImage DifferenceThreshold : "<<toleranceDiffPixelImage);
// Now compare the two images
typedef itk::DifferenceImageFilter<ImageType,ImageType> DiffType;
DiffType::Pointer diff = DiffType::New();
......@@ -396,12 +399,13 @@ int RegressionTestImage (const char *testImageFilename, const char *baselineImag
double status = diff->GetTotalDifference();
otbMsgDebugMacro(<< "Status diff->GetTotalDifference : "<<status);
// if there are discrepencies, create an diff image
if (status && reportErrors)
{
typedef itk::RescaleIntensityImageFilter<ImageType,OutputType> RescaleType;
typedef itk::ExtractImageFilter<OutputType,DiffOutputType> ExtractType;
typedef itk::ImageFileWriter<DiffOutputType> WriterType;
typedef otb::ImageFileWriter<DiffOutputType> WriterType;
typedef itk::ImageRegion<ITK_TEST_DIMENSION_MAX> RegionType;
OutputType::IndexType index; index.Fill(0);
OutputType::SizeType size; size.Fill(0);
......
......@@ -3,8 +3,7 @@
FILE(GLOB OTBIO_SRCS "*.cxx" )
ADD_LIBRARY(OTBIO ${OTBIO_SRCS})
#TARGET_LINK_LIBRARIES (OTBIO cai ${GDAL_LIBRARY} OTBCommon ITKIO ITKCommon)
TARGET_LINK_LIBRARIES (OTBIO cai gdal OTBCommon ITKIO ITKCommon)
TARGET_LINK_LIBRARIES (OTBIO gdal OTBCommon ITKIO ITKCommon)
INSTALL_TARGETS(/lib/otb OTBIO )
INSTALL_FILES(/include/otb/IO "(\\.h|\\.txx)$")
This diff is collapsed.
/*=========================================================================
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.
=========================================================================*/
#ifndef __otbCAIImageIO_h
#define __otbCAIImageIO_h
#ifdef _MSC_VER
#pragma warning ( disable : 4786 )
#endif
#include <string>
#include <fstream>
#include "itkImageIOBase.h"
#include <stdio.h>
namespace otb
{
/** \class CAIImageIO
*
* \brief ImageIO object for reading and writing CAI images
*
* The streaming read/write are implemented.
*
* \ingroup IOFilters
*
*/
class ITK_EXPORT CAIImageIO : public itk::ImageIOBase
{
public:
/** Standard class typedefs. */
typedef CAIImageIO Self;
typedef itk::ImageIOBase Superclass;
typedef itk::SmartPointer<Self> Pointer;
/** Method for creation through the object factory. */
itkNewMacro(Self);
/** Run-time type information (and related methods). */
itkTypeMacro(CAIImageIO, Superclass);
/*-------- This part of the interfaces deals with reading data. ----- */
/** Determine the file type. Returns true if this ImageIO can read the
* file specified. */
virtual bool CanReadFile(const char*) ;
/** Determine the file type. Returns true if the ImageIO can stream read the specified file */
virtual bool CanStreamRead(){ return true; };
/** Set the spacing and dimension information for the set filename. */
virtual void ReadImageInformation();
/** Reads the data from disk into the memory buffer provided. */
virtual void Read(void* buffer);
/*-------- This part of the interfaces deals with writing data. ----- */
/** Determine the file type. Returns true if this ImageIO can write the
* file specified. */
virtual bool CanWriteFile(const char*);
/** Determine the file type. Returns true if the ImageIO can stream write the specified file */
virtual bool CanStreamWrite() { return true; };
/** Set the spacing and dimension information for the set filename. */
virtual void WriteImageInformation();
/** Writes the data to disk from the memory buffer provided. Make sure
* that the IORegions has been set properly. */
virtual void Write(const void* buffer);
CAIImageIO();
~CAIImageIO();
void PrintSelf(std::ostream& os, itk::Indent indent) const;
private:
CAIImageIO(const Self&); //purposely not implemented
void operator=(const Self&); //purposely not implemented
/** Methode permettant de recuperer le format et le nom de l'image a partir du
nom d'un fichier image. */
bool GetInfosCAI( const char * filename, std::string & CaiFileName, std::string & CaiFormat );
/** Determine si l'image est au format SPOT */
bool DetermineFormatSpot (char typspot, const char * str_repertoire ,
char * str_debut );
void OpenCAIFileForWriting();
/** Pointer sur la structure CAI */
char * m_ptrCai;
/** Nombre d'octets par pixel */
int m_NbOctetPixel;
};
} // end namespace otb
#endif // __otbCAIImageIO_h
/*=========================================================================
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.
=========================================================================*/
#include "otbCAIImageIOFactory.h"
#include "itkCreateObjectFunction.h"
#include "otbCAIImageIO.h"
#include "itkVersion.h"
namespace otb
{
CAIImageIOFactory::CAIImageIOFactory()
{
this->RegisterOverride("itkImageIOBase",
"otbCAIImageIO",
"CAI Image IO",
1,
itk::CreateObjectFunction<CAIImageIO>::New());
}
CAIImageIOFactory::~CAIImageIOFactory()
{
}
const char*
CAIImageIOFactory::GetITKSourceVersion(void) const
{
return ITK_SOURCE_VERSION;
}
const char*
CAIImageIOFactory::GetDescription() const
{
return "CAI ImageIO Factory, permettant le chargement d'image CAI dans l'OTB";
}
} // end namespace otb
/*=========================================================================
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.
=========================================================================*/
#ifndef __otbCAIImageIOFactory_h
#define __otbCAIImageIOFactory_h
#include "itkObjectFactoryBase.h"
#include "itkImageIOBase.h"
namespace otb
{
/** \class CAIImageIOFactory
* \brief Creation d'un instance d'un objet CAIImageIO utilisant les object factory.
*/
class ITK_EXPORT CAIImageIOFactory : public itk::ObjectFactoryBase
{
public:
/** Standard class typedefs. */
typedef CAIImageIOFactory Self;
typedef itk::ObjectFactoryBase Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
/** Class methods used to interface with the registered factories. */
virtual const char* GetITKSourceVersion(void) const;
virtual const char* GetDescription(void) const;
/** Method for class instantiation. */
itkFactorylessNewMacro(Self);
/** Run-time type information (and related methods). */
itkTypeMacro(CAIImageIOFactory, itk::ObjectFactoryBase);
/** Register one factory of this type */
static void RegisterOneFactory(void)
{
CAIImageIOFactory::Pointer CAIFactory = CAIImageIOFactory::New();
itk::ObjectFactoryBase::RegisterFactory(CAIFactory);
}
protected:
CAIImageIOFactory();
~CAIImageIOFactory();
private:
CAIImageIOFactory(const Self&); //purposely not implemented
void operator=(const Self&); //purposely not implemented
};
} // end namespace otb
#endif
This diff is collapsed.
......@@ -101,7 +101,8 @@ public:
virtual bool CanWriteFile(const char*);
/** Determine the file type. Returns true if the ImageIO can stream write the specified file */
virtual bool CanStreamWrite() { return false; };
//THOMAS
virtual bool CanStreamWrite() { return true; };
/** Writes the spacing and dimentions of the image.
* Assumes SetFileName has been called with a valid file name. */
......@@ -146,9 +147,12 @@ private:
* on regarde s'il contient un produit CEOS (fichier "DAT...")
* Dans ce cas, GdalFileName contient le nom du fichier a ouvrir. Sinon GdalFileName contient filename
*/
bool GetGdalImageFileName( const char * filename, std::string & GdalFileName );
bool GetGdalReadImageFileName( const char * filename, std::string & GdalFileName );
/** Determine real file name to write the image */
std::string GetGdalWriteImageFileName(std::string & extGDAL, std::string filename );
std::string TypeConversion(const char* extension);
std::string TypeConversion(std::string name);
/** GDAL parameters. */
GDALDriver * m_hDriver;
......@@ -161,6 +165,8 @@ private:
bool GDALInfoReportCorner( const char * corner_name, double x, double y,
double &dfGeoX, double &dfGeoY);
bool m_FlagWriteImageInformation;
};
} // end namespace otb
......
......@@ -30,9 +30,6 @@ namespace otb
/** \class ImageFileReader
* \brief Ressource en lecture pour lire une image depuis un fichier.
*
* For an SPOT5 TIF image, if the user specify the directory, this image is read with CAI library.
* Otherwise, if the user specify the name of the image ('IMAGERY.TIF'), it read with GDAL library.
*
* \sa ImageSeriesReader
* \sa ImageIOBase
*
......
......@@ -170,16 +170,13 @@ ImageFileReader<TOutputImage>
this->m_ImageIO->Read(loadBuffer);
otbMsgDebugMacro(<< "Buffer conversion required from: "
otbMsgDevMacro(<< "Buffer conversion required from: "
<< this->m_ImageIO->GetComponentTypeInfo().name()
<< " to: "
<< typeid(ITK_TYPENAME ConvertPixelTraits::ComponentType).name());
<< typeid(ITK_TYPENAME ConvertPixelTraits::ComponentType).name() << " ImageSizeInBytes()"<<this->m_ImageIO->GetImageSizeInBytes()<<" region.GetNumberOfPixels()"<<region.GetNumberOfPixels());
this->DoConvertBuffer(loadBuffer, region.GetNumberOfPixels());
otbMsgDebugMacro(<<"ImageSizeInBytes()"<<this->m_ImageIO->GetImageSizeInBytes());
otbMsgDebugMacro(<<"region.GetNumberOfPixels()"<<region.GetNumberOfPixels());
delete [] loadBuffer;
}
}
......@@ -208,7 +205,7 @@ ImageFileReader<TOutputImage>
}
else
{
//otbMsgDebugMacro( << " Streaming Image Read ");
otbMsgDevMacro( << " Streaming Image Read ");
}
}
......
......@@ -181,9 +181,9 @@ ImageFileWriter<TInputImage>
// Notify start event observers
this->InvokeEvent( itk::StartEvent() );
otbMsgDebugMacro( << this->GetFileName() );
this->GetImageIO()->SetFileName( this->GetFileName() );
this->GetImageIO()->WriteImageInformation();
//otbMsgDevMacro( << this->GetFileName() );
// this->GetImageIO()->SetFileName( this->GetFileName() );
// this->GetImageIO()->WriteImageInformation();
// Actually do something
......
......@@ -23,7 +23,6 @@
#include "itkMutexLock.h"
#include "itkMutexLockHolder.h"
#include "otbCAIImageIOFactory.h"
#include "otbGDALImageIOFactory.h"
#include "otbONERAImageIOFactory.h"
#include "otbMSTARImageIOFactory.h"
......@@ -52,19 +51,13 @@ ImageIOFactory::RegisterBuiltInFactories()
itk::MutexLockHolder<itk::SimpleMutexLock> mutexHolder( mutex );
if( firstTime )
{
//For an SPOT5TIF image, if the user set only the directory, this image is read with CAI.
//Otherwise, if the user set the name of the image ('IMAGERY.TIF') it read with GDAL.
// ONERA format for OTB
itk::ObjectFactoryBase::RegisterFactory( ONERAImageIOFactory::New() );
// MSTAR Format for OTB
itk::ObjectFactoryBase::RegisterFactory( MSTARImageIOFactory::New() );
// GDAL : New format for OTB
itk::ObjectFactoryBase::RegisterFactory( GDALImageIOFactory::New() );
// CAI : New format for OTB
itk::ObjectFactoryBase::RegisterFactory( CAIImageIOFactory::New() );
// ONERA format for OTB
itk::ObjectFactoryBase::RegisterFactory( ONERAImageIOFactory::New() ); //MSTAR Format
itk::ObjectFactoryBase::RegisterFactory( MSTARImageIOFactory::New() );
firstTime = false;
firstTime = false;
}
}
......
......@@ -2,22 +2,20 @@ PROJECT(FeatureExtraction)
INCLUDE_REGULAR_EXPRESSION("^.*$")
ADD_EXECUTABLE(ChangeDetectionFrameworkExample ChangeDetectionFrameworkExample.cxx )
TARGET_LINK_LIBRARIES(ChangeDetectionFrameworkExample OTBCommon OTBIO ITKCommon ITKIO)
TARGET_LINK_LIBRARIES(ChangeDetectionFrameworkExample OTBCommon gdal OTBIO ITKCommon ITKIO)
ADD_EXECUTABLE(DiffChDet DiffChDet.cxx)
TARGET_LINK_LIBRARIES(DiffChDet OTBIO OTBCommon ${CAI_LIBRARY} ${GDAL_LIBRARY} ITKCommon ITKIO)
TARGET_LINK_LIBRARIES(DiffChDet OTBIO OTBCommon gdal ITKCommon ITKIO)
ADD_EXECUTABLE(RatioChDet RatioChDet.cxx)
TARGET_LINK_LIBRARIES(RatioChDet OTBIO OTBCommon ${CAI_LIBRARY} ${GDAL_LIBRARY} ITKCommon ITKIO)
TARGET_LINK_LIBRARIES(RatioChDet OTBIO OTBCommon gdal ITKCommon ITKIO)
ADD_EXECUTABLE(CorrelChDet CorrelChDet.cxx)
TARGET_LINK_LIBRARIES(CorrelChDet OTBIO OTBCommon ${CAI_LIBRARY} ${GDAL_LIBRARY} ITKCommon ITKIO)
TARGET_LINK_LIBRARIES(CorrelChDet OTBIO OTBCommon gdal ITKCommon ITKIO)
ADD_EXECUTABLE(LHMIChDet LHMIChDet.cxx)
TARGET_LINK_LIBRARIES(LHMIChDet OTBIO OTBCommon ${CAI_LIBRARY}
${GDAL_LIBRARY} ITKCommon ITKIO ITKStatistics)
TARGET_LINK_LIBRARIES(LHMIChDet OTBIO OTBCommon gdal ITKCommon ITKIO ITKStatistics)
ADD_EXECUTABLE(JHMIChDet JHMIChDet.cxx)
TARGET_LINK_LIBRARIES(JHMIChDet OTBIO OTBCommon ${CAI_LIBRARY}
${GDAL_LIBRARY} ITKCommon ITKIO ITKStatistics)
TARGET_LINK_LIBRARIES(JHMIChDet OTBIO OTBCommon gdal ITKCommon ITKIO ITKStatistics)
......@@ -36,7 +36,7 @@ AssymmetricFusionOfLineDetectorExample.cxx)
TARGET_LINK_LIBRARIES(AssymmetricFusionOfLineDetectorExample OTBCommon OTBIO ITKCommon ITKIO)
ADD_EXECUTABLE(LocalHoughExample LocalHoughExample.cxx )
TARGET_LINK_LIBRARIES(LocalHoughExample ITKIO OTBIO OTBCommon ITKCommon ${CAI_LIBRARY} ${GDAL_LIBRARY})
TARGET_LINK_LIBRARIES(LocalHoughExample ITKIO OTBIO OTBCommon ITKCommon gdal)
ADD_EXECUTABLE(ExtractSegmentsByStepsExample
......
......@@ -6,26 +6,26 @@ TARGET_LINK_LIBRARIES(GenerateTrainingImageExample OTBCommon OTBIO OTBLearning I
ADD_EXECUTABLE(SVMPointSetExample SVMPointSetExample.cxx )
TARGET_LINK_LIBRARIES(SVMPointSetExample ITKIO OTBIO OTBCommon
ITKCommon OTBLearning ${CAI_LIBRARY} ${GDAL_LIBRARY})
ITKCommon OTBLearning gdal)
ADD_EXECUTABLE(SVMPointSetModelEstimatorExample SVMPointSetModelEstimatorExample.cxx )
TARGET_LINK_LIBRARIES(SVMPointSetModelEstimatorExample ITKIO OTBIO
OTBCommon ITKCommon OTBLearning ${CAI_LIBRARY} ${GDAL_LIBRARY})
OTBCommon ITKCommon OTBLearning gdal)
ADD_EXECUTABLE(SVMImageModelEstimatorExample SVMImageModelEstimatorExample.cxx )
TARGET_LINK_LIBRARIES(SVMImageModelEstimatorExample ITKIO OTBIO
OTBCommon ITKCommon OTBLearning ${CAI_LIBRARY} ${GDAL_LIBRARY})
OTBCommon ITKCommon OTBLearning gdal)
ADD_EXECUTABLE(SVMPointSetClassificationExample SVMPointSetClassificationExample.cxx )
TARGET_LINK_LIBRARIES(SVMPointSetClassificationExample ITKIO OTBIO
OTBCommon ITKCommon OTBLearning ${CAI_LIBRARY} ${GDAL_LIBRARY})
OTBCommon ITKCommon OTBLearning gdal)
ADD_EXECUTABLE(SVMImageClassificationExample SVMImageClassificationExample.cxx )
TARGET_LINK_LIBRARIES(SVMImageClassificationExample ITKIO OTBIO
OTBCommon ITKCommon OTBLearning ${CAI_LIBRARY} ${GDAL_LIBRARY})
OTBCommon ITKCommon OTBLearning gdal)
ADD_EXECUTABLE(SVMImageEstimatorClassificationMultiExample SVMImageEstimatorClassificationMultiExample.cxx )
TARGET_LINK_LIBRARIES(SVMImageEstimatorClassificationMultiExample ITKIO OTBIO
OTBCommon ITKCommon OTBLearning ${CAI_LIBRARY} ${GDAL_LIBRARY})
OTBCommon ITKCommon OTBLearning gdal)
......@@ -2,9 +2,9 @@ PROJECT(FeatureExtraction)
INCLUDE_REGULAR_EXPRESSION("^.*$")
#ADD_EXECUTABLE(GreyVisuExample GreyVisuExample.cxx )
#TARGET_LINK_LIBRARIES(GreyVisuExample OTBVisu OTBIO OTBCommon cai ITKIO ITKCommon)
#TARGET_LINK_LIBRARIES(GreyVisuExample OTBVisu OTBIO OTBCommon ITKIO ITKCommon)
ADD_EXECUTABLE(VisuExample1 VisuExample1.cxx )
TARGET_LINK_LIBRARIES(VisuExample1 OTBVisu OTBIO OTBCommon cai ITKIO ITKCommon)
TARGET_LINK_LIBRARIES(VisuExample1 OTBVisu OTBIO OTBCommon ITKIO ITKCommon)
......@@ -141,19 +141,23 @@ ADD_TEST(coTvMultiChannelROI_RGB2NG_PNG3 ${COMMON_TESTS}
-startX 700 -startY 60 -sizeX 77 -sizeY 489 -channels 3 )
ADD_TEST(coTvMultiChannelROI_5c_BSQ ${COMMON_TESTS}
--compare-binary ${BASELINE}/coMultiChannelExtractROI_RGB2NG_PNG_poupees_303_2_134_330_channels_12321.c1
${TEMP}/coMultiChannelExtractROI_RGB2NG_PNG_poupees_303_2_134_330_channels_12321.c1
# --compare-binary ${BASELINE}/coMultiChannelExtractROI_RGB2NG_PNG_poupees_303_2_134_330_channels_12321.c1
# ${TEMP}/coMultiChannelExtractROI_RGB2NG_PNG_poupees_303_2_134_330_channels_12321.c1
--compare-image ${TOL} ${BASELINE}/coMultiChannelExtractROI_RGB2NG_PNG_poupees_303_2_134_330_channels_12321.hdr
${TEMP}/coMultiChannelExtractROI_RGB2NG_PNG_poupees_303_2_134_330_channels_12321.hdr
otbMultiChannelExtractROI
${INPUTDATA}/poupees.hd
${TEMP}/coMultiChannelExtractROI_RGB2NG_PNG_poupees_303_2_134_330_channels_12321.hd
${INPUTDATA}/poupees.hdr
${TEMP}/coMultiChannelExtractROI_RGB2NG_PNG_poupees_303_2_134_330_channels_12321.hdr
-startX 303 -startY 2 -sizeX 134 -sizeY 330 -channels 1 2 3 2 1 )
ADD_TEST(coTvMultiChannelROI_3c_BSQ ${COMMON_TESTS}
--compare-binary ${BASELINE}/coMultiChannelExtractROI_RGB2NG_PNG_poupees_303_2_134_330_channels_345.c1
${TEMP}/coMultiChannelExtractROI_RGB2NG_PNG_poupees_303_2_134_330_channels_345.c1
# --compare-binary ${BASELINE}/coMultiChannelExtractROI_RGB2NG_PNG_poupees_303_2_134_330_channels_345.c1
# ${TEMP}/coMultiChannelExtractROI_RGB2NG_PNG_poupees_303_2_134_330_channels_345.c1
--compare-image ${TOL} ${BASELINE}/coMultiChannelExtractROI_RGB2NG_PNG_poupees_303_2_134_330_channels_345.hdr
${TEMP}/coMultiChannelExtractROI_RGB2NG_PNG_poupees_303_2_134_330_channels_345.hdr
otbMultiChannelExtractROI
${TEMP}/coMultiChannelExtractROI_RGB2NG_PNG_poupees_303_2_134_330_channels_12321.hd
${TEMP}/coMultiChannelExtractROI_RGB2NG_PNG_poupees_303_2_134_330_channels_345.hd
${TEMP}/coMultiChannelExtractROI_RGB2NG_PNG_poupees_303_2_134_330_channels_12321.hdr
${TEMP}/coMultiChannelExtractROI_RGB2NG_PNG_poupees_303_2_134_330_channels_345.hdr
-startX 0 -startY 0 -sizeX 134 -sizeY 330 -channels 3 4 5 )
......
......@@ -18,8 +18,8 @@
#include "itkExceptionObject.h"
#include "itkImageFileReader.h"
#include "itkImageFileWriter.h"
#include "otbImageFileReader.h"
#include "otbImageFileWriter.h"
#include "itkImage.h"
#include "otbExtractROI.h"
......@@ -46,8 +46,8 @@ int otbExtractROI( int argc, char ** argv )
typedef FilterType::InputImageType InputImageType;
typedef FilterType::OutputImageType OutputImageType;
typedef itk::ImageFileReader< InputImageType > ReaderType;
typedef itk::ImageFileWriter< OutputImageType > WriterType;
typedef otb::ImageFileReader< InputImageType > ReaderType;
typedef otb::ImageFileWriter< OutputImageType > WriterType;
FilterType::Pointer filter = FilterType::New();
// filter->SetStartX( startX );
......
......@@ -19,8 +19,8 @@
#include "itkExceptionObject.h"
#include "itkImageFileReader.h"
#include "itkImageFileWriter.h"
#include "otbImageFileReader.h"
#include "otbImageFileWriter.h"
#include "otbExtractROI.h"
#include "itkImage.h"
#include "itkRGBPixel.h"
......@@ -48,8 +48,8 @@ int otbExtractROI_RGB( int argc, char ** argv )
typedef FilterType::InputImageType InputImageType;
typedef FilterType::OutputImageType OutputImageType;
typedef itk::ImageFileReader< InputImageType > ReaderType;
typedef itk::ImageFileWriter< OutputImageType > WriterType;
typedef otb::ImageFileReader< InputImageType > ReaderType;
typedef otb::ImageFileWriter< OutputImageType > WriterType;
FilterType::Pointer filter = FilterType::New();
filter->SetStartX( startX );
......
......@@ -18,14 +18,14 @@ SET(FEATUREEXTRACTION_TESTS ${CXX_TEST_PATH}/otbFeatureExtractionTests)
ADD_TEST(feTuAlignMV2ITK ${FEATUREEXTRACTION_TESTS}
otbAlignImageToPath
${INPUTDATA}/poupees.hd
${INPUTDATA}/poupees.hdr
${TEMP}/feAlign.txt)
# ------- otb::Draw ------------------------------
ADD_TEST(feTuDrawSegmentIntoImage ${FEATUREEXTRACTION_TESTS}
otbDrawPathList
${INPUTDATA}/poupees.hd
${INPUTDATA}/poupees.hdr
${TEMP}/feDrawPathIntoPoupees.png)
ADD_TEST(feTuDrawSegmentIntoImageLine ${FEATUREEXTRACTION_TESTS}
......@@ -87,19 +87,19 @@ ADD_TEST(feTuTouziNew ${FEATUREEXTRACTION_TESTS}
otbTouziEdgeDetectorNew)
ADD_TEST(feTvTouzi ${FEATUREEXTRACTION_TESTS}
--compare-image ${TOL} ${BASELINE}/feFiltreTouzi_amst_3.hd
${TEMP}/feFiltreTouzi_amst_3.hd
--compare-image ${TOL} ${BASELINE}/feFiltreTouzi_amst_3.hdr
${TEMP}/feFiltreTouzi_amst_3.hdr