diff --git a/Code/IO/otbImageSeriesFileReader.h b/Code/IO/otbImageSeriesFileReader.h index 7f4ac334f273047b04a6ea110493dc1e2adabc24..cb8a76de11a9457e0717b48eca748486b638c1aa 100644 --- a/Code/IO/otbImageSeriesFileReader.h +++ b/Code/IO/otbImageSeriesFileReader.h @@ -48,97 +48,97 @@ template < class TImage, class TInternalImage = TImage > class ITK_EXPORT ImageSeriesFileReader : public ImageSeriesFileReaderBase< TImage, TInternalImage > { - public: - /** Standart typedefs */ - typedef ImageSeriesFileReader Self; - typedef ImageSeriesFileReaderBase< TImage, TInternalImage > Superclass; - typedef itk::SmartPointer<Self> Pointer; - typedef itk::SmartPointer<const Self> ConstPointer; - - /** Creation through object factory macro */ - itkNewMacro(Self); - /** Runtime informations macro */ - itkTypeMacro(ImageSeriesFileReader,ImageSeriesFileReaderBase); - - typedef typename Superclass::OutputImageType OutputImageType; - typedef typename Superclass::OutputImagePointerType OutputImagePointerType; - typedef typename Superclass::PixelType PixelType; - typedef typename Superclass::ValueType ValueType; - typedef typename Superclass::IndexType IndexType; - typedef typename Superclass::SizeType SizeType; - typedef typename Superclass::RegionType RegionType; - - typedef typename Superclass::OutputImageListType OutputImageListType; - typedef typename Superclass::OutputImageListPointerType OutputImageListPointerType; - typedef typename Superclass::OutputImageListConstPointerType OutputImageListConstPointerType; - - typedef typename Superclass::InternalImageType InternalImageType; - typedef typename Superclass::InternalImagePointerType InternalImagePointerType; - typedef typename Superclass::InternalPixelType InternalPixelType; - typedef typename Superclass::InternalValueType InternalValueType; - typedef typename Superclass::InternalIndexType InternalIndexType; - typedef typename Superclass::InternalSizeType InternalSizeType; - typedef typename Superclass::InternalRegionType InternalRegionType; - - typedef typename Superclass::ReaderType ReaderType; - typedef typename Superclass::ReaderType ReaderPointerType; - - typedef typename Superclass::ReaderListType ReaderListType; - typedef typename Superclass::ReaderListPointerType ReaderListPointerType; - - /** This is a generic template definition of the ROI extraction procedure. - * In fact, it will be specialised with: - * - MultiChannelExtractROI if TImage is a VectorImage - * - MultiToMonoChannelExtractROI if TImage is an Image and TInteranalImage is a VectorImage - * - ExtractROI if TImage and TInternalImage are of Image type. - */ - // typedef MultiChannelExtractROI< InternalPixelType, PixelType > ExtractSelectionType; - // typedef MultiToMonoChannelExtractROI< InternalPixelType, PixelType > ExtractSelectionType; - // typedef ExtractROI< InternalPixelType, PixelType > ExtractSelectionType; - typedef itk::ImageToImageFilter< InternalImageType, OutputImageType > ExtractSelectionType; - typedef typename ExtractSelectionType::Pointer ExtractSelectionPointerType; - - typedef ObjectList< ExtractSelectionType > ExtractSelectionListType; - typedef typename ExtractSelectionListType::Pointer ExtractSelectionListPointerType; - - protected: - ImageSeriesFileReader(); - virtual ~ImageSeriesFileReader () { } - - /** - * Tests the coherency of the Meta File (especifically band selection) with the image types - */ - virtual void TestBandSelection( std::vector<unsigned int> & bands ) { } - - /** GenerateData - * This method will be specialised if template definitions follow: - * - TImage is a VectorImage - * - TImage is an Image and TInteranalImage is a VectorImage - * - TImage and TInternalImage are of Image type. - */ - virtual void GenerateData ( unsigned int idx ); - - /** - * Once MetaFile is read, allocation of lists are performed in SetFileName. - * This allows specific (or global) initialisation in the GenerateData methods, - * that the user may invoke throught GenerateOutput() or GenerateOutput( idx ). - */ - virtual void AllocateListOfComponents ( void ); - - /** PrintSelf method */ - void PrintSelf ( std::ostream& os, itk::Indent indent ) const - { - return Superclass::PrintSelf( os, indent ); - } - - /** - * Type of extractor to use - */ - ExtractSelectionListPointerType m_ExtractorList; - - private: - ImageSeriesFileReader ( const Self & ); - void operator= ( const Self & ); +public: + /** Standart typedefs */ + typedef ImageSeriesFileReader Self; + typedef ImageSeriesFileReaderBase< TImage, TInternalImage > Superclass; + typedef itk::SmartPointer<Self> Pointer; + typedef itk::SmartPointer<const Self> ConstPointer; + + /** Creation through object factory macro */ + itkNewMacro(Self); + /** Runtime informations macro */ + itkTypeMacro(ImageSeriesFileReader,ImageSeriesFileReaderBase); + + typedef typename Superclass::OutputImageType OutputImageType; + typedef typename Superclass::OutputImagePointerType OutputImagePointerType; + typedef typename Superclass::PixelType PixelType; + typedef typename Superclass::ValueType ValueType; + typedef typename Superclass::IndexType IndexType; + typedef typename Superclass::SizeType SizeType; + typedef typename Superclass::RegionType RegionType; + + typedef typename Superclass::OutputImageListType OutputImageListType; + typedef typename Superclass::OutputImageListPointerType OutputImageListPointerType; + typedef typename Superclass::OutputImageListConstPointerType OutputImageListConstPointerType; + + typedef typename Superclass::InternalImageType InternalImageType; + typedef typename Superclass::InternalImagePointerType InternalImagePointerType; + typedef typename Superclass::InternalPixelType InternalPixelType; + typedef typename Superclass::InternalValueType InternalValueType; + typedef typename Superclass::InternalIndexType InternalIndexType; + typedef typename Superclass::InternalSizeType InternalSizeType; + typedef typename Superclass::InternalRegionType InternalRegionType; + + typedef typename Superclass::ReaderType ReaderType; + typedef typename Superclass::ReaderType ReaderPointerType; + + typedef typename Superclass::ReaderListType ReaderListType; + typedef typename Superclass::ReaderListPointerType ReaderListPointerType; + + /** This is a generic template definition of the ROI extraction procedure. + * In fact, it will be specialised with: + * - MultiChannelExtractROI if TImage is a VectorImage + * - MultiToMonoChannelExtractROI if TImage is an Image and TInteranalImage is a VectorImage + * - ExtractROI if TImage and TInternalImage are of Image type. + */ + // typedef MultiChannelExtractROI< InternalPixelType, PixelType > ExtractSelectionType; + // typedef MultiToMonoChannelExtractROI< InternalPixelType, PixelType > ExtractSelectionType; + // typedef ExtractROI< InternalPixelType, PixelType > ExtractSelectionType; + typedef itk::ImageToImageFilter< InternalImageType, OutputImageType > ExtractSelectionType; + typedef typename ExtractSelectionType::Pointer ExtractSelectionPointerType; + + typedef ObjectList< ExtractSelectionType > ExtractSelectionListType; + typedef typename ExtractSelectionListType::Pointer ExtractSelectionListPointerType; + +protected: + ImageSeriesFileReader(); + virtual ~ImageSeriesFileReader () { } + + /** TestBandSelection + * Tests the coherency of the Meta File (especifically band selection) with the image types + */ + virtual void TestBandSelection( std::vector<unsigned int> & bands ) { } + + /** GenerateData + * This method will be specialised if template definitions follow: + * - TImage is a VectorImage + * - TImage is an Image and TInteranalImage is a VectorImage + * - TImage and TInternalImage are of Image type. + */ + virtual void GenerateData ( unsigned int idx ); + + /** AllocateListOfComponents + * Once MetaFile is read, allocation of lists are performed in SetFileName. + * This allows specific (or global) initialisation in the GenerateData methods, + * that the user may invoke throught GenerateOutput() or GenerateOutput( idx ). + */ + virtual void AllocateListOfComponents ( void ); + + /** PrintSelf method */ + void PrintSelf ( std::ostream& os, itk::Indent indent ) const + { + return Superclass::PrintSelf( os, indent ); + } + + /** + * Type of extractor to use + */ + ExtractSelectionListPointerType m_ExtractorList; + +private: + ImageSeriesFileReader ( const Self & ); + void operator= ( const Self & ); }; // end of class /** @@ -156,92 +156,91 @@ template < class TPixel, class TInternalPixel > class ITK_EXPORT ImageSeriesFileReader< Image< TPixel, 2 >, Image< TInternalPixel, 2 > > : public ImageSeriesFileReaderBase< Image< TPixel, 2 >, Image< TInternalPixel, 2 > > { - public: - /** Standart typedefs */ - typedef ImageSeriesFileReader Self; - typedef ImageSeriesFileReaderBase< Image< TPixel, 2 >, Image< TInternalPixel, 2 > > Superclass; - typedef itk::SmartPointer<Self> Pointer; - typedef itk::SmartPointer<const Self> ConstPointer; - - /** Creation through object factory macro */ - itkNewMacro(Self); - /** Runtime informations macro */ - itkTypeMacro(ImageSeriesFileReader,ImageSeriesFileReaderBase); - - typedef typename Superclass::OutputImageType OutputImageType; - typedef typename Superclass::OutputImagePointerType OutputImagePointerType; - typedef typename Superclass::PixelType PixelType; - typedef typename Superclass::ValueType ValueType; - typedef typename Superclass::IndexType IndexType; - typedef typename Superclass::SizeType SizeType; - typedef typename Superclass::RegionType RegionType; - - typedef typename Superclass::OutputImageListType OutputImageListType; - typedef typename Superclass::OutputImageListPointerType OutputImageListPointerType; - typedef typename Superclass::OutputImageListConstPointerType OutputImageListConstPointerType; - - typedef typename Superclass::InternalImageType InternalImageType; - typedef typename Superclass::InternalImagePointerType InternalImagePointerType; - typedef typename Superclass::InternalPixelType InternalPixelType; - typedef typename Superclass::InternalValueType InternalValueType; - typedef typename Superclass::InternalIndexType InternalIndexType; - typedef typename Superclass::InternalSizeType InternalSizeType; - typedef typename Superclass::InternalRegionType InternalRegionType; - - typedef typename Superclass::ReaderType ReaderType; - typedef typename Superclass::ReaderType ReaderPointerType; - - typedef typename Superclass::ReaderListType ReaderListType; - typedef typename Superclass::ReaderListPointerType ReaderListPointerType; - - /** This is a specialised template definition of the ROI extraction procedure. - * Here TExtractSelection is a ExtractROI class since TImage and TInternalImage are of Image type. - */ - typedef ExtractROI< InternalPixelType, PixelType > ExtractSelectionType; - typedef typename ExtractSelectionType::Pointer ExtractSelectionPointerType; - - typedef ObjectList< ExtractSelectionType > ExtractSelectionListType; - typedef typename ExtractSelectionListType::Pointer ExtractSelectionListPointerType; - - protected: - ImageSeriesFileReader(); - virtual ~ImageSeriesFileReader () { } - - /** - * Tests the coherency of the Meta File (especifically band selection) with the image types - */ - virtual void TestBandSelection( std::vector<unsigned int> & bands ); - - /** GenerateData - * This method will be specialised if template definitions follow: - * - TImage is a VectorImage - * - TImage is an Image and TInteranalImage is a VectorImage - * - TImage and TInternalImage are of Image type. - */ - virtual void GenerateData ( unsigned int idx ); - - /** - * Once MetaFile is read, allocation of lists are performed in SetFileName. - * This allows specific (or global) initialisation in the GenerateData methods, - * that the user may invoke throught GenerateOutput() or GenerateOutput( idx ). - */ - virtual void AllocateListOfComponents ( void ); - - /** PrintSelf method */ - void PrintSelf ( std::ostream& os, itk::Indent indent ) const - { - return Superclass::PrintSelf( os, indent ); - } - - /** - * Type of extractor to use - */ - ExtractSelectionListPointerType m_ExtractorList; - - private: - ImageSeriesFileReader ( const Self & ); - void operator= ( const Self & ); - +public: + /** Standart typedefs */ + typedef ImageSeriesFileReader Self; + typedef ImageSeriesFileReaderBase< Image< TPixel, 2 >, Image< TInternalPixel, 2 > > Superclass; + typedef itk::SmartPointer<Self> Pointer; + typedef itk::SmartPointer<const Self> ConstPointer; + + /** Creation through object factory macro */ + itkNewMacro(Self); + /** Runtime informations macro */ + itkTypeMacro(ImageSeriesFileReader,ImageSeriesFileReaderBase); + + typedef typename Superclass::OutputImageType OutputImageType; + typedef typename Superclass::OutputImagePointerType OutputImagePointerType; + typedef typename Superclass::PixelType PixelType; + typedef typename Superclass::ValueType ValueType; + typedef typename Superclass::IndexType IndexType; + typedef typename Superclass::SizeType SizeType; + typedef typename Superclass::RegionType RegionType; + + typedef typename Superclass::OutputImageListType OutputImageListType; + typedef typename Superclass::OutputImageListPointerType OutputImageListPointerType; + typedef typename Superclass::OutputImageListConstPointerType OutputImageListConstPointerType; + + typedef typename Superclass::InternalImageType InternalImageType; + typedef typename Superclass::InternalImagePointerType InternalImagePointerType; + typedef typename Superclass::InternalPixelType InternalPixelType; + typedef typename Superclass::InternalValueType InternalValueType; + typedef typename Superclass::InternalIndexType InternalIndexType; + typedef typename Superclass::InternalSizeType InternalSizeType; + typedef typename Superclass::InternalRegionType InternalRegionType; + + typedef typename Superclass::ReaderType ReaderType; + typedef typename Superclass::ReaderType ReaderPointerType; + + typedef typename Superclass::ReaderListType ReaderListType; + typedef typename Superclass::ReaderListPointerType ReaderListPointerType; + + /** This is a specialised template definition of the ROI extraction procedure. + * Here TExtractSelection is a ExtractROI class since TImage and TInternalImage are of Image type. + */ + typedef ExtractROI< InternalPixelType, PixelType > ExtractSelectionType; + typedef typename ExtractSelectionType::Pointer ExtractSelectionPointerType; + + typedef ObjectList< ExtractSelectionType > ExtractSelectionListType; + typedef typename ExtractSelectionListType::Pointer ExtractSelectionListPointerType; + +protected: + ImageSeriesFileReader(); + virtual ~ImageSeriesFileReader () { } + + /** TestBandSelection + * Tests the coherency of the Meta File (especifically band selection) with the image types + */ + virtual void TestBandSelection( std::vector<unsigned int> & bands ); + + /** GenerateData + * This method will be specialised if template definitions follow: + * - TImage is a VectorImage + * - TImage is an Image and TInteranalImage is a VectorImage + * - TImage and TInternalImage are of Image type. + */ + virtual void GenerateData ( unsigned int idx ); + + /** + * Once MetaFile is read, allocation of lists are performed in SetFileName. + * This allows specific (or global) initialisation in the GenerateData methods, + * that the user may invoke throught GenerateOutput() or GenerateOutput( idx ). + */ + virtual void AllocateListOfComponents ( void ); + + /** PrintSelf method */ + void PrintSelf ( std::ostream& os, itk::Indent indent ) const + { + return Superclass::PrintSelf( os, indent ); + } + + /** + * Type of extractor to use + */ + ExtractSelectionListPointerType m_ExtractorList; + +private: + ImageSeriesFileReader ( const Self & ); + void operator= ( const Self & ); }; // end of class specialized for image /** ImagerSeriesFileReader @@ -258,91 +257,91 @@ template < class TPixel, class TInternalPixel > class ITK_EXPORT ImageSeriesFileReader< Image< TPixel, 2 >, VectorImage< TInternalPixel, 2 > > : public ImageSeriesFileReaderBase< Image< TPixel, 2 >, VectorImage< TInternalPixel, 2 > > { - public: - /** Standart typedefs */ - typedef ImageSeriesFileReader Self; - typedef ImageSeriesFileReaderBase< Image< TPixel, 2 >, VectorImage< TInternalPixel, 2 > > Superclass; - typedef itk::SmartPointer<Self> Pointer; - typedef itk::SmartPointer<const Self> ConstPointer; - - /** Creation through object factory macro */ - itkNewMacro(Self); - /** Runtime informations macro */ - itkTypeMacro(ImageSeriesFileReader,ImageSeriesFileReaderBase); - - typedef typename Superclass::OutputImageType OutputImageType; - typedef typename Superclass::OutputImagePointerType OutputImagePointerType; - typedef typename Superclass::PixelType PixelType; - typedef typename Superclass::ValueType ValueType; - typedef typename Superclass::IndexType IndexType; - typedef typename Superclass::SizeType SizeType; - typedef typename Superclass::RegionType RegionType; - - typedef typename Superclass::OutputImageListType OutputImageListType; - typedef typename Superclass::OutputImageListPointerType OutputImageListPointerType; - typedef typename Superclass::OutputImageListConstPointerType OutputImageListConstPointerType; - - typedef typename Superclass::InternalImageType InternalImageType; - typedef typename Superclass::InternalImagePointerType InternalImagePointerType; - typedef typename Superclass::InternalPixelType InternalPixelType; - typedef typename Superclass::InternalValueType InternalValueType; - typedef typename Superclass::InternalIndexType InternalIndexType; - typedef typename Superclass::InternalSizeType InternalSizeType; - typedef typename Superclass::InternalRegionType InternalRegionType; - - typedef typename Superclass::ReaderType ReaderType; - typedef typename Superclass::ReaderType ReaderPointerType; - - typedef typename Superclass::ReaderListType ReaderListType; - typedef typename Superclass::ReaderListPointerType ReaderListPointerType; - - /** This is a specific template definition of the ROI extraction procedure. - * MultiToMonoChannelExtractROI since TImage is an Image and TInteranalImage is a VectorImage - */ - typedef MultiToMonoChannelExtractROI< InternalPixelType, PixelType > ExtractSelectionType; - typedef typename ExtractSelectionType::Pointer ExtractSelectionPointerType; - - typedef ObjectList< ExtractSelectionType > ExtractSelectionListType; - typedef typename ExtractSelectionListType::Pointer ExtractSelectionListPointerType; - - protected: - ImageSeriesFileReader(); - virtual ~ImageSeriesFileReader () { } - - /** - * Tests the coherency of the Meta File (especifically band selection) with the image types - */ - virtual void TestBandSelection( std::vector<unsigned int> & bands ); - - /** GenerateData - * This method will be specialised if template definitions follow: - * - TImage is a VectorImage - * - TImage is an Image and TInteranalImage is a VectorImage - * - TImage and TInternalImage are of Image type. - */ - virtual void GenerateData ( unsigned int idx ); - - /** - * Once MetaFile is read, allocation of lists are performed in SetFileName. - * This allows specific (or global) initialisation in the GenerateData methods, - * that the user may invoke throught GenerateOutput() or GenerateOutput( idx ). - */ - virtual void AllocateListOfComponents ( void ); - - /** PrintSelf method */ - void PrintSelf ( std::ostream& os, itk::Indent indent ) const - { - return Superclass::PrintSelf( os, indent ); - } - - /** - * Type of extractor to use - */ - ExtractSelectionListPointerType m_ExtractorList; - - private: - ImageSeriesFileReader ( const Self & ); - void operator= ( const Self & ); +public: + /** Standart typedefs */ + typedef ImageSeriesFileReader Self; + typedef ImageSeriesFileReaderBase< Image< TPixel, 2 >, VectorImage< TInternalPixel, 2 > > Superclass; + typedef itk::SmartPointer<Self> Pointer; + typedef itk::SmartPointer<const Self> ConstPointer; + + /** Creation through object factory macro */ + itkNewMacro(Self); + /** Runtime informations macro */ + itkTypeMacro(ImageSeriesFileReader,ImageSeriesFileReaderBase); + + typedef typename Superclass::OutputImageType OutputImageType; + typedef typename Superclass::OutputImagePointerType OutputImagePointerType; + typedef typename Superclass::PixelType PixelType; + typedef typename Superclass::ValueType ValueType; + typedef typename Superclass::IndexType IndexType; + typedef typename Superclass::SizeType SizeType; + typedef typename Superclass::RegionType RegionType; + + typedef typename Superclass::OutputImageListType OutputImageListType; + typedef typename Superclass::OutputImageListPointerType OutputImageListPointerType; + typedef typename Superclass::OutputImageListConstPointerType OutputImageListConstPointerType; + + typedef typename Superclass::InternalImageType InternalImageType; + typedef typename Superclass::InternalImagePointerType InternalImagePointerType; + typedef typename Superclass::InternalPixelType InternalPixelType; + typedef typename Superclass::InternalValueType InternalValueType; + typedef typename Superclass::InternalIndexType InternalIndexType; + typedef typename Superclass::InternalSizeType InternalSizeType; + typedef typename Superclass::InternalRegionType InternalRegionType; + + typedef typename Superclass::ReaderType ReaderType; + typedef typename Superclass::ReaderType ReaderPointerType; + + typedef typename Superclass::ReaderListType ReaderListType; + typedef typename Superclass::ReaderListPointerType ReaderListPointerType; + + /** This is a specific template definition of the ROI extraction procedure. + * MultiToMonoChannelExtractROI since TImage is an Image and TInteranalImage is a VectorImage + */ + typedef MultiToMonoChannelExtractROI< InternalPixelType, PixelType > ExtractSelectionType; + typedef typename ExtractSelectionType::Pointer ExtractSelectionPointerType; + + typedef ObjectList< ExtractSelectionType > ExtractSelectionListType; + typedef typename ExtractSelectionListType::Pointer ExtractSelectionListPointerType; + +protected: + ImageSeriesFileReader(); + virtual ~ImageSeriesFileReader () { } + + /** + * Tests the coherency of the Meta File (especifically band selection) with the image types + */ + virtual void TestBandSelection( std::vector<unsigned int> & bands ); + + /** GenerateData + * This method will be specialised if template definitions follow: + * - TImage is a VectorImage + * - TImage is an Image and TInteranalImage is a VectorImage + * - TImage and TInternalImage are of Image type. + */ + virtual void GenerateData ( unsigned int idx ); + + /** + * Once MetaFile is read, allocation of lists are performed in SetFileName. + * This allows specific (or global) initialisation in the GenerateData methods, + * that the user may invoke throught GenerateOutput() or GenerateOutput( idx ). + */ + virtual void AllocateListOfComponents ( void ); + + /** PrintSelf method */ + void PrintSelf ( std::ostream& os, itk::Indent indent ) const + { + return Superclass::PrintSelf( os, indent ); + } + + /** + * Type of extractor to use + */ + ExtractSelectionListPointerType m_ExtractorList; + +private: + ImageSeriesFileReader ( const Self & ); + void operator= ( const Self & ); }; // end of class specialized for Image and VectorImage @@ -361,92 +360,93 @@ template < class TPixel, class TInternalPixel > class ITK_EXPORT ImageSeriesFileReader< VectorImage< TPixel, 2 >, VectorImage< TInternalPixel, 2 > > : public ImageSeriesFileReaderBase< VectorImage< TPixel, 2 >, VectorImage< TInternalPixel, 2 > > { - public: - /** Standart typedefs */ - typedef ImageSeriesFileReader Self; - typedef ImageSeriesFileReaderBase< VectorImage< TPixel, 2 >, VectorImage< TInternalPixel, 2 > > Superclass; - typedef itk::SmartPointer<Self> Pointer; - typedef itk::SmartPointer<const Self> ConstPointer; - - /** Creation through object factory macro */ - itkNewMacro(Self); - /** Runtime informations macro */ - itkTypeMacro(ImageSeriesFileReader,ImageSeriesFileReaderBase); - - typedef typename Superclass::OutputImageType OutputImageType; - typedef typename Superclass::OutputImagePointerType OutputImagePointerType; - typedef typename Superclass::PixelType PixelType; - typedef typename Superclass::ValueType ValueType; - typedef typename Superclass::IndexType IndexType; - typedef typename Superclass::SizeType SizeType; - typedef typename Superclass::RegionType RegionType; - - typedef typename Superclass::OutputImageListType OutputImageListType; - typedef typename Superclass::OutputImageListPointerType OutputImageListPointerType; - typedef typename Superclass::OutputImageListConstPointerType OutputImageListConstPointerType; - - typedef typename Superclass::InternalImageType InternalImageType; - typedef typename Superclass::InternalImagePointerType InternalImagePointerType; - typedef typename Superclass::InternalPixelType InternalPixelType; - typedef typename Superclass::InternalValueType InternalValueType; - typedef typename Superclass::InternalIndexType InternalIndexType; - typedef typename Superclass::InternalSizeType InternalSizeType; - typedef typename Superclass::InternalRegionType InternalRegionType; - - typedef typename Superclass::ReaderType ReaderType; - typedef typename Superclass::ReaderType ReaderPointerType; - - typedef typename Superclass::ReaderListType ReaderListType; - typedef typename Superclass::ReaderListPointerType ReaderListPointerType; - - /** This is a specific template definition of the ROI extraction procedure. - * Here, it will be specialised with: - * MultiChannelExtractROI if TImage is a VectorImage - */ - typedef MultiChannelExtractROI< InternalPixelType, PixelType > ExtractSelectionType; - typedef typename ExtractSelectionType::Pointer ExtractSelectionPointerType; - - typedef ObjectList< ExtractSelectionType > ExtractSelectionListType; - typedef typename ExtractSelectionListType::Pointer ExtractSelectionListPointerType; - - protected: - ImageSeriesFileReader(); - virtual ~ImageSeriesFileReader () { } - - /** - * Tests the coherency of the Meta File (especifically band selection) with the image types - */ - virtual void TestBandSelection( std::vector<unsigned int> & bands ){ } - - /** GenerateData - * This method will be specialised if template definitions follow: - * - TImage is a VectorImage - * - TImage is an Image and TInteranalImage is a VectorImage - * - TImage and TInternalImage are of Image type. - */ - virtual void GenerateData ( unsigned int idx ); - - /** - * Once MetaFile is read, allocation of lists are performed in SetFileName. - * This allows specific (or global) initialisation in the GenerateData methods, - * that the user may invoke throught GenerateOutput() or GenerateOutput( idx ). - */ - virtual void AllocateListOfComponents ( void ); - - /** PrintSelf method */ - void PrintSelf ( std::ostream& os, itk::Indent indent ) const - { - return Superclass::PrintSelf( os, indent ); - } - - /** - * Type of extractor to use - */ - ExtractSelectionListPointerType m_ExtractorList; - - private: - ImageSeriesFileReader ( const Self & ); - void operator= ( const Self & ); +public: + /** Standart typedefs */ + typedef ImageSeriesFileReader Self; + typedef ImageSeriesFileReaderBase< VectorImage< TPixel, 2 >, VectorImage< TInternalPixel, 2 > > Superclass; + typedef itk::SmartPointer<Self> Pointer; + typedef itk::SmartPointer<const Self> ConstPointer; + + /** Creation through object factory macro */ + itkNewMacro(Self); + /** Runtime informations macro */ + itkTypeMacro(ImageSeriesFileReader,ImageSeriesFileReaderBase); + + typedef typename Superclass::OutputImageType OutputImageType; + typedef typename Superclass::OutputImagePointerType OutputImagePointerType; + typedef typename Superclass::PixelType PixelType; + typedef typename Superclass::ValueType ValueType; + typedef typename Superclass::IndexType IndexType; + typedef typename Superclass::SizeType SizeType; + typedef typename Superclass::RegionType RegionType; + + typedef typename Superclass::OutputImageListType OutputImageListType; + typedef typename Superclass::OutputImageListPointerType OutputImageListPointerType; + typedef typename Superclass::OutputImageListConstPointerType OutputImageListConstPointerType; + + typedef typename Superclass::InternalImageType InternalImageType; + typedef typename Superclass::InternalImagePointerType InternalImagePointerType; + typedef typename Superclass::InternalPixelType InternalPixelType; + typedef typename Superclass::InternalValueType InternalValueType; + typedef typename Superclass::InternalIndexType InternalIndexType; + typedef typename Superclass::InternalSizeType InternalSizeType; + typedef typename Superclass::InternalRegionType InternalRegionType; + + typedef typename Superclass::ReaderType ReaderType; + typedef typename Superclass::ReaderType ReaderPointerType; + + typedef typename Superclass::ReaderListType ReaderListType; + typedef typename Superclass::ReaderListPointerType ReaderListPointerType; + + /** This is a specific template definition of the ROI extraction procedure. + * Here, it will be specialised with: + * MultiChannelExtractROI if TImage is a VectorImage + */ + typedef MultiChannelExtractROI< InternalPixelType, PixelType > ExtractSelectionType; + typedef typename ExtractSelectionType::Pointer ExtractSelectionPointerType; + + typedef ObjectList< ExtractSelectionType > ExtractSelectionListType; + typedef typename ExtractSelectionListType::Pointer ExtractSelectionListPointerType; + + +protected: + ImageSeriesFileReader(); + virtual ~ImageSeriesFileReader () { } + + /** + * Tests the coherency of the Meta File (especifically band selection) with the image types + */ + virtual void TestBandSelection( std::vector<unsigned int> & bands ){ } + + /** GenerateData + * This method will be specialised if template definitions follow: + * - TImage is a VectorImage + * - TImage is an Image and TInteranalImage is a VectorImage + * - TImage and TInternalImage are of Image type. + */ + virtual void GenerateData ( unsigned int idx ); + + /** + * Once MetaFile is read, allocation of lists are performed in SetFileName. + * This allows specific (or global) initialisation in the GenerateData methods, + * that the user may invoke throught GenerateOutput() or GenerateOutput( idx ). + */ + virtual void AllocateListOfComponents ( void ); + + /** PrintSelf method */ + void PrintSelf ( std::ostream& os, itk::Indent indent ) const + { + return Superclass::PrintSelf( os, indent ); + } + + /** + * Type of extractor to use + */ + ExtractSelectionListPointerType m_ExtractorList; + +private: + ImageSeriesFileReader ( const Self & ); + void operator= ( const Self & ); }; // end of class specialized for VectorImage } // end of namespace otb