ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkJPEG2000ImageIO.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkJPEG2000ImageIO_h
19 #define itkJPEG2000ImageIO_h
20 
21 
22 #include <fstream>
24 #include "itkAutoPointer.h"
25 
26 namespace itk
27 {
28 
29 class JPEG2000ImageIOInternal;
30 
50 {
51 public:
56 
58  itkNewMacro(Self);
59 
62 
63  /*-------- This part of the interfaces deals with reading data. ----- */
64 
67  virtual bool CanReadFile(const char *) ITK_OVERRIDE;
68 
70  virtual void ReadImageInformation() ITK_OVERRIDE;
71 
73  virtual void Read(void *buffer) ITK_OVERRIDE;
74 
75  /*-------- This part of the interfaces deals with writing data. ----- */
76 
79  virtual bool CanWriteFile(const char *) ITK_OVERRIDE;
80 
82  virtual void WriteImageInformation() ITK_OVERRIDE;
83 
86  virtual void Write(const void *buffer) ITK_OVERRIDE;
87 
92  virtual ImageIORegion
93  GenerateStreamableReadRegionFromRequestedRegion(const ImageIORegion & requested) const ITK_OVERRIDE;
94 
96  virtual SizeType GetHeaderSize(void) const ITK_OVERRIDE;
97 
99  void SetTileSize(int x, int y);
100 
106  virtual bool CanStreamWrite( void ) ITK_OVERRIDE;
107 
108 protected:
109  JPEG2000ImageIO();
110  ~JPEG2000ImageIO();
111 
112  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
113 
114 private:
115  JPEG2000ImageIO(const Self &) ITK_DELETE_FUNCTION;
116  void operator=(const Self &) ITK_DELETE_FUNCTION;
117 
118  AutoPointer< JPEG2000ImageIOInternal > m_Internal;
119 
122 
123  void ComputeRegionInTileBoundaries(unsigned int dimension,
124  SizeValueType tileSize, ImageIORegion & streamableRegion) const;
125 };
126 } // end namespace itk
127 
128 #endif // itkJPEG2000ImageIO_h
Light weight base class for most itk classes.
An ImageIORegion represents a structured region of data.
virtual void ReadImageInformation() override
void SetTileSize(int x, int y)
SmartPointer< Self > Pointer
A base class for specific ImageIO file formats which support streaming.
virtual bool CanWriteFile(const char *) override
virtual void Write(const void *buffer) override
virtual ImageIORegion GenerateStreamableReadRegionFromRequestedRegion(const ImageIORegion &requested) const override
::itk::intmax_t SizeType
virtual bool CanStreamWrite(void) override
virtual void Read(void *buffer) override
::itk::SizeValueType SizeValueType
virtual void PrintSelf(std::ostream &os, Indent indent) const override
virtual SizeType GetHeaderSize(void) const override
::itk::IndexValueType IndexValueType
void ComputeRegionInTileBoundaries(unsigned int dimension, SizeValueType tileSize, ImageIORegion &streamableRegion) const
Implements an Automatic Pointer to an object.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Supports for the JPEG2000 file format based on openjpeg.
virtual void WriteImageInformation() override
StreamingImageIOBase Superclass
virtual bool CanReadFile(const char *) override
AutoPointer< JPEG2000ImageIOInternal > m_Internal