Commit 8ff6ca74 authored by Julien Michel's avatar Julien Michel
Browse files

MRG

parents cb1de131 2c295bd7
......@@ -69,7 +69,6 @@ DEMToOrthoImageGenerator<TDEMImage, TMapProjection>
// Walk the output image, evaluating the height at each pixel
IndexType currentindex;
PointType cartoPoint;
double height;
PointType geoPoint;
for (outIt.GoToBegin(); !outIt.IsAtEnd(); ++outIt)
{
......
......@@ -381,7 +381,6 @@ IkonosImageMetadataInterface::VariableLengthVectorType
IkonosImageMetadataInterface
::GetPhysicalBias() const
{
const MetaDataDictionaryType& dict = this->GetMetaDataDictionary();
if (!this->CanRead())
{
itkExceptionMacro(<< "Invalid Metadata, no Ikonos Image");
......@@ -398,7 +397,6 @@ IkonosImageMetadataInterface::VariableLengthVectorType
IkonosImageMetadataInterface
::GetPhysicalGain() const
{
const MetaDataDictionaryType& dict = this->GetMetaDataDictionary();
if (!this->CanRead())
{
itkExceptionMacro(<< "Invalid Metadata, no Ikonos Image");
......
......@@ -18,6 +18,10 @@
#ifndef __otbTileMapImageIOHelper_h
#define __otbTileMapImageIOHelper_h
#include "itkObject.h"
#include "itkObjectFactory.h"
#include <string>
#include <iostream>
#include <sstream>
......@@ -30,11 +34,30 @@ namespace otb
*
*/
class TileMapImageIOHelper
class TileMapImageIOHelper: public itk::Object
{
public:
/** Standard class typedefs. */
typedef TileMapImageIOHelper Self;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
typedef itk::Object Superclass;
itkTypeMacro(TileMapImageIOHelper, itk::Object);
itkNewMacro(Self);
/** Correspondance between depth and scale for the quad tree paradigm*/
const std::string ConvertDepthToScale(const unsigned int depth) const;
protected:
TileMapImageIOHelper() {}
~TileMapImageIOHelper() {}
private:
TileMapImageIOHelper(const Self &); //purposely not implemented
void operator =(const Self&); //purposely not implemented
}; // end class TileMapImageIOHelper
} // end namespace otb
......
......@@ -189,7 +189,7 @@ private:
for(unsigned int i=0; i<ImageDimension; i++)
{
#ifdef ITK_USE_CENTERED_PIXEL_COORDINATES_CONSISTENTLY
if( itk::Math::RoundHalfIntegerUp<IndexValueType>(index[i]) < static_cast<IndexValueType>( region.GetIndex(i) ) + m_NeighborhoodRadius )
if( itk::Math::RoundHalfIntegerUp<IndexValueType>(index[i]) < static_cast<IndexValueType>( region.GetIndex(i) ) + static_cast<IndexValueType>(m_NeighborhoodRadius) )
#else
if( index[i] < static_cast<TCoordRepType>( region.GetIndex(i) ) + m_NeighborhoodRadius )
#endif
......
......@@ -37,7 +37,7 @@ namespace otb
{
template <class TFunctionPrecision>
class DefaultDescriptorsType
class DefaultDescriptorType
{
public:
typedef itk::VariableLengthVector<TFunctionPrecision> Type;
......@@ -236,7 +236,7 @@ class ITK_EXPORT ObjectDetectionClassifier :
TOutputVectorData,
TLabel,
itk::FunctionBase< itk::Point<TCoordRep, 2>,
typename DefaultDescriptorsType<TFunctionPrecision>::Type> >
typename DefaultDescriptorType<TFunctionPrecision>::Type> >
>
{
public:
......@@ -248,7 +248,7 @@ public:
TOutputVectorData,
TLabel,
itk::FunctionBase< itk::Point<TCoordRep, 2>,
typename DefaultDescriptorsType<TFunctionPrecision>::Type> >
typename DefaultDescriptorType<TFunctionPrecision>::Type> >
> Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
......@@ -269,7 +269,7 @@ public:
typedef itk::Point<TCoordRep, 2> PointType;
/** The return value of the function */
typedef typename DefaultDescriptorsType<FunctionPrecision>::Type DescriptorType;
typedef typename DefaultDescriptorType<FunctionPrecision>::Type DescriptorType;
/** The function evaluated on the input image at locations specified by the vector data */
typedef itk::FunctionBase<PointType, DescriptorType> DescriptorsFunctionType;
......
......@@ -96,7 +96,7 @@ SpectralSensitivityReader
}
catch (itk::ExceptionObject& err)
{
itkExceptionMacro(<< "Invalid input image");
itkExceptionMacro(<< "Invalid input image" << err.GetDescription());
}
std::string instrument = oss.str();
......
......@@ -41,9 +41,6 @@ int otbComplexToVectorImageCastFilterNew(int argc, char * argv[])
int otbComplexToVectorImageCastFilterTest(int argc, char * argv[])
{
const char * infname = argv[1];
const char * outfname = argv[2];
typedef std::complex<float> ComplexType;
typedef otb::Image<ComplexType, 2> CplxImageType;
typedef otb::VectorImage<float, 2> VectorImageType;
......
......@@ -29,7 +29,6 @@
int otbResampleSLCImage(int argc, char * argv[])
{
const char* inputFilename = argv[1];
const char* outputFilename = argv[2];
const unsigned int Dimension = 2;
typedef std::complex<double> ComplexPixelType;
......
......@@ -2709,7 +2709,7 @@ ADD_TEST(ioTvTileMapImageIOHelperTest ${IO_TESTS21}
ADD_TEST(ioTvImageDoubleToImageComplex ${IO_TESTS21}
otbImageDoubleToImageComplex
${INPUTDATA}/monobandUnsignedInt.tif
${INPUTDATA}/monobandDouble.tif
)
ADD_TEST(ioTvImageComplexToImageDouble ${IO_TESTS21}
......@@ -2754,7 +2754,7 @@ ADD_TEST(ioTvVectorImageComplexToVectorImageComplex ${IO_TESTS21}
ADD_TEST(ioTvImageDoubleToVectorImageComplex ${IO_TESTS21}
otbImageDoubleToVectorImageComplex
${INPUTDATA}/monobandUnsignedInt.tif
${INPUTDATA}/monobandDouble.tif
)
#----------------------------------------------------------------------------------
......
......@@ -22,14 +22,15 @@
int otbTileMapImageIOHelperNew(int argc, char * argv[])
{
otb::TileMapImageIOHelper myTileMapImageIOHelper;
otb::TileMapImageIOHelper::Pointer myTileMapImageIOHelper;
myTileMapImageIOHelper = otb::TileMapImageIOHelper::New();
return EXIT_SUCCESS;
}
int otbTileMapImageIOHelperTest(int argc, char * argv[])
{
otb::TileMapImageIOHelper myTileMapImageIOHelper;
otb::TileMapImageIOHelper::Pointer myTileMapImageIOHelper;
myTileMapImageIOHelper = otb::TileMapImageIOHelper::New();
char * filename = argv[1];
std::ofstream file;
......@@ -37,7 +38,7 @@ int otbTileMapImageIOHelperTest(int argc, char * argv[])
for (unsigned int i=0; i < 22; ++i)
{
file << i << ": " << myTileMapImageIOHelper.ConvertDepthToScale(i) << std::endl;
file << i << ": " << myTileMapImageIOHelper->ConvertDepthToScale(i) << std::endl;
}
file.close();
......
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