diff --git a/Code/IO/otbMapFileProductWriter.h b/Code/IO/otbMapFileProductWriter.h index 1f541d82b51b3614908785c2730501e5b54abf7c..5f8c9196ee261a361fa39ff96a65ec3ee30fb5d8 100644 --- a/Code/IO/otbMapFileProductWriter.h +++ b/Code/IO/otbMapFileProductWriter.h @@ -48,7 +48,7 @@ class ITK_EXPORT MapFileProductWriter : public itk::ProcessObject { public: /** Standard class typedefs. */ - typedef MapFileProductWriter Self; + typedef MapFileProductWriter Self; typedef itk::ProcessObject Superclass; typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<const Self> ConstPointer; @@ -60,35 +60,35 @@ public: itkTypeMacro(MapFileProductWriter, itk::ProcessObject); /** Some convenient typedefs. */ - typedef TInputImage InputImageType; + typedef TInputImage InputImageType; typedef typename InputImageType::InternalPixelType InternalPixelType; - typedef typename InputImageType::SizeType SizeType; - typedef typename InputImageType::IndexType IndexType; - typedef unsigned char OutputPixelType; - typedef typename InputImageType::Pointer InputImagePointer; - typedef typename InputImageType::RegionType InputImageRegionType; - typedef typename InputImageType::PixelType InputImagePixelType; - - typedef VectorData<double,2> VectorDataType; - typedef typename VectorDataType::DataNodeType DataNodeType; - typedef typename DataNodeType::PolygonType PolygonType; - typedef typename PolygonType::VertexType VertexType; + typedef typename InputImageType::SizeType SizeType; + typedef typename InputImageType::IndexType IndexType; + typedef unsigned char OutputPixelType; + typedef typename InputImageType::Pointer InputImagePointer; + typedef typename InputImageType::RegionType InputImageRegionType; + typedef typename InputImageType::PixelType InputImagePixelType; + + typedef VectorData<double,2> VectorDataType; + typedef typename VectorDataType::DataNodeType DataNodeType; + typedef typename DataNodeType::PolygonType PolygonType; + typedef typename PolygonType::VertexType VertexType; - typedef VectorDataFileWriter<VectorDataType> VectorDataFileWriterType; + typedef VectorDataFileWriter<VectorDataType> VectorDataFileWriterType; /// Multi channels Extract ROI filter typedef MultiChannelExtractROI<InternalPixelType, OutputPixelType> VectorImageExtractROIFilterType; // Writer - typedef ImageFileWriter< VectorImage<OutputPixelType> > VectorWriterType; - + typedef ImageFileWriter< VectorImage<OutputPixelType> > VectorWriterType; + // Resampler typedef StreamingShrinkImageFilter<InputImageType,InputImageType > StreamingShrinkImageFilterType; // Intensity Rescale typedef VectorRescaleIntensityImageFilter<InputImageType, - InputImageType> VectorRescaleIntensityImageFilterType; + InputImageType> VectorRescaleIntensityImageFilterType; // Transformer typedef GenericRSTransform<> TransformType; diff --git a/Code/IO/otbMapFileProductWriter.txx b/Code/IO/otbMapFileProductWriter.txx index 8bbf91524589617c2ca80f9dc16d7bc05bcb5637..59f12e08a387dd6f233e0780b7503c160bb222ed 100644 --- a/Code/IO/otbMapFileProductWriter.txx +++ b/Code/IO/otbMapFileProductWriter.txx @@ -123,7 +123,8 @@ MapFileProductWriter<TInputImage> // check that the right extension is given : expected .map if (itksys::SystemTools::GetFilenameLastExtension(m_FileName) != ".map") { - itkExceptionMacro(<<itksys::SystemTools::GetFilenameLastExtension(m_Path)<<" is a wrong Extension FileName : Expected .map"); + itkExceptionMacro(<<itksys::SystemTools::GetFilenameLastExtension(m_Path) + <<" is a wrong Extension FileName : Expected .map"); } // the path to the directory where the mapfile will be written @@ -221,7 +222,7 @@ MapFileProductWriter<TInputImage> m_StreamingShrinkImageFilter->SetInput(m_VectorImage); m_VectorRescaleIntensityImageFilter = VectorRescaleIntensityImageFilterType::New(); - m_VectorRescaleIntensityImageFilter->SetInput(m_StreamingShrinkImageFilter->GetOutput()); //m_ResampleVectorImage); + m_VectorRescaleIntensityImageFilter->SetInput(m_StreamingShrinkImageFilter->GetOutput()); m_VectorRescaleIntensityImageFilter->SetOutputMinimum(outMin); m_VectorRescaleIntensityImageFilter->SetOutputMaximum(outMax); @@ -296,7 +297,7 @@ MapFileProductWriter<TInputImage> // Create directory where to store generated tiles std::ostringstream path; path << m_Path<<"/tiles"; - + ossimFilename cachingDir(path.str()); cachingDir.createDirectory(); @@ -304,7 +305,7 @@ MapFileProductWriter<TInputImage> std::ostringstream ossFileName; ossFileName << m_Path<<"/"; ossFileName << "tiles/tile_"; - ossFileName << m_CurrentDepth<<"_"; + ossFileName << m_CurrentDepth<<"_"; ossFileName << x<<"_"; ossFileName << y; ossFileName << ".tif"; @@ -319,8 +320,8 @@ MapFileProductWriter<TInputImage> m_VectorImageExtractROIFilter->SetSizeY(extractSize[1]); // Set Channel to extract - m_VectorImageExtractROIFilter->SetChannel(1); - m_VectorImageExtractROIFilter->SetChannel(2); + m_VectorImageExtractROIFilter->SetChannel(1); + m_VectorImageExtractROIFilter->SetChannel(2); m_VectorImageExtractROIFilter->SetChannel(3); // Set extract roi input diff --git a/Testing/Code/IO/otbMapFileProductWriterNew.cxx b/Testing/Code/IO/otbMapFileProductWriterNew.cxx index cf0d8f6dcb0f42d365a617966d025cf1116b73d0..796a06b13634b64ec3399a00f3514d213ccfd718 100644 --- a/Testing/Code/IO/otbMapFileProductWriterNew.cxx +++ b/Testing/Code/IO/otbMapFileProductWriterNew.cxx @@ -29,4 +29,3 @@ int otbMapFileProductWriterNew(int argc, char* argv[]) return EXIT_SUCCESS; } -