ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkAnalyzeObjectLabelMapImageIO.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Insight Segmentation & Registration Toolkit
4 Module: $RCSfile: itkAnalyzeObjectLabelMapImageIO.h,v $
5 Language: C++
6 Date: $Date: 2007/03/29 20:11:16 $
7 Version: $Revision: 1.5 $
8 
9 Copyright (c) Insight Software Consortium. All rights reserved.
10 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 
18 #ifndef itkAnalyzeObjectLabelMapImageIO_h
19 #define itkAnalyzeObjectLabelMapImageIO_h
20 
21 #ifdef _MSC_VER
22 #pragma warning ( disable : 4786 )
23 #endif
24 
25 #include <fstream>
26 #include "itkImageRegionIterator.h"
27 
28 #include "itkAnalyzeObjectEntry.h"
29 
30 namespace itk
31 {
32 using AnalyzeObjectEntryArrayType = std::vector<AnalyzeObjectEntry::Pointer>;
33 const char *const ANALYZE_OBJECT_LABEL_MAP_ENTRY_ARRAY = "ANALYZE_OBJECT_LABEL_MAP_ENTRY_ARRAY";
37 constexpr int VERSION1 = 880102;
38 constexpr int VERSION2 = 880801;
39 constexpr int VERSION3 = 890102;
40 static const int VERSION4 = 900302;
41 static const int VERSION5 = 910402;
42 static const int VERSION6 = 910926;
43 static const int VERSION7 = 20050829;
44 
49 
54 class ITK_EXPORT AnalyzeObjectLabelMapImageIO : public ImageIOBase
55 {
56 public:
57  ITK_DISALLOW_COPY_AND_ASSIGN(AnalyzeObjectLabelMapImageIO);
58 
63 
66 
68  itkNewMacro(Self);
69 
72 
73  /*-------- This part of the interfaces deals with reading data. ----- */
74 
81  bool CanReadFile(const char* FileNameToRead) override;
82 
84  void ReadImageInformation() override;
85 
87  void Read(void* buffer) override;
88 
89  /*-------- This part of the interfaces deals with writing data. ----- */
90 
97  bool CanWriteFile(const char * FileNameToWrite) override;
98 
100  void WriteImageInformation() override;
101 
104  void Write(const void* buffer) override;
105 
106  // Streaming not yet supported, so use the default base class to return the LargestPossibleRegion
107 #if _USE_STREAMABLE_REGION_FOR_AOLM
108 
110  virtual ImageIORegion GenerateStreamableReadRegionFromRequestedRegion( const ImageIORegion & requestedRegion ) const;
111 
112 #endif
113 
114  bool CanStreamRead() override
115  {
116  return false;
117  }
118 
119 protected:
121  ~AnalyzeObjectLabelMapImageIO() override;
122  void PrintSelf(std::ostream& os, Indent indent) const override;
123 
124 private:
125 
126  std::ifstream m_InputFileStream;
128  // int m_CollapsedDims[8];
129 };
130 
131 } // end namespace itk
132 
133 #endif //itkAnalyzeObjectLabelMapImageIO_h
constexpr int VERSION2
Light weight base class for most itk classes.
An ImageIORegion represents a structured region of data.
Abstract superclass defines image IO interface.
constexpr int NumberOfRunLengthElementsPerRead
static const int VERSION7
static const int VERSION6
constexpr int VERSION3
Represent Red, Green and Blue components for color images.
Definition: itkRGBPixel.h:58
const char *const ANALYZE_OBJECT_LABEL_MAP_ENTRY_ARRAY
std::vector< AnalyzeObjectEntry::Pointer > AnalyzeObjectEntryArrayType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
constexpr int VERSION1
static const int VERSION4
Base class for most ITK classes.
Definition: itkObject.h:60
Templated n-dimensional image class.
Definition: itkImage.h:75
static const int VERSION5