ITK  4.9.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 typedef std::vector<AnalyzeObjectEntry::Pointer> AnalyzeObjectEntryArrayType;
33 const char *const ANALYZE_OBJECT_LABEL_MAP_ENTRY_ARRAY = "ANALYZE_OBJECT_LABEL_MAP_ENTRY_ARRAY";
37 const int VERSION1 = 880102;
38 const int VERSION2 = 880801;
39 const 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 
62 
65 
67  itkNewMacro(Self);
68 
71 
72  /*-------- This part of the interfaces deals with reading data. ----- */
73 
80  virtual bool CanReadFile(const char* FileNameToRead);
81 
83  virtual void ReadImageInformation();
84 
86  virtual void Read(void* buffer);
87 
88  /*-------- This part of the interfaces deals with writing data. ----- */
89 
96  virtual bool CanWriteFile(const char * FileNameToWrite);
97 
99  virtual void WriteImageInformation();
100 
103  virtual void Write(const void* buffer);
104 
105  // Streaming not yet supported, so use the default base class to return the LargestPossibleRegion
106 #if _USE_STREAMABLE_REGION_FOR_AOLM
107 
109  virtual ImageIORegion GenerateStreamableReadRegionFromRequestedRegion( const ImageIORegion & requestedRegion ) const;
110 
111 #endif
112 
113  virtual bool CanStreamRead()
114  {
115  return false;
116  }
117 
118 protected:
121  void PrintSelf(std::ostream& os, Indent indent) const;
122 
123 private:
124 
125  std::ifstream m_InputFileStream;
127  // int m_CollapsedDims[8];
128  AnalyzeObjectLabelMapImageIO(const Self &); // purposely not implemented
129  void operator=(const Self &); // purposely not implemented
130 
131 };
132 
133 } // end namespace itk
134 
135 #endif //itkAnalyzeObjectLabelMapImageIO_h
const int NumberOfRunLengthElementsPerRead
Light weight base class for most itk classes.
std::vector< AnalyzeObjectEntry::Pointer > AnalyzeObjectEntryArrayType
An ImageIORegion represents a structured region of data.
Abstract superclass defines image IO interface.
static const int VERSION7
static const int VERSION6
Represent Red, Green and Blue components for color images.
Definition: itkRGBPixel.h:58
const char *const ANALYZE_OBJECT_LABEL_MAP_ENTRY_ARRAY
Control indentation during Print() invocation.
Definition: itkIndent.h:49
static const int VERSION4
Base class for most ITK classes.
Definition: itkObject.h:57
Templated n-dimensional image class.
Definition: itkImage.h:75
static const int VERSION5