ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkJPEG2000ImageIO.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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>
23#include "ITKIOJPEG2000Export.h"
25#include "memory"
26
27
28namespace itk
29{
30
31class JPEG2000ImageIOInternal;
38{
39public:
44 enum class DecodingFormat : uint8_t
45 {
50 };
51
55 enum class DFMFormat : uint8_t
56 {
61 };
62};
63// Define how to print enumeration
64extern ITKIOJPEG2000_EXPORT std::ostream &
65 operator<<(std::ostream & out, const JPEG2000ImageIOInternalEnums::DecodingFormat value);
66extern ITKIOJPEG2000_EXPORT std::ostream &
67 operator<<(std::ostream & out, const JPEG2000ImageIOInternalEnums::DFMFormat value);
68
87class ITKIOJPEG2000_EXPORT JPEG2000ImageIO : public StreamingImageIOBase
88{
89public:
90 ITK_DISALLOW_COPY_AND_MOVE(JPEG2000ImageIO);
91
96
98 itkNewMacro(Self);
99
101 itkOverrideGetNameOfClassMacro(JPEG2000ImageIO);
102
103 /*-------- This part of the interfaces deals with reading data. ----- */
104
107 bool
108 CanReadFile(const char *) override;
109
111 void
113
115 void
116 Read(void * buffer) override;
117
118 /*-------- This part of the interfaces deals with writing data. ----- */
119
122 bool
123 CanWriteFile(const char *) override;
124
126 void
128
131 void
132 Write(const void * buffer) override;
133
139 GenerateStreamableReadRegionFromRequestedRegion(const ImageIORegion & requestedRegion) const override;
140
143 GetHeaderSize() const override;
144
146 void
147 SetTileSize(int x, int y);
148
154 bool
155 CanStreamWrite() override;
156
157protected:
160
161 void
162 PrintSelf(std::ostream & os, Indent indent) const override;
163
164private:
165 std::unique_ptr<JPEG2000ImageIOInternal> m_Internal;
166
169
170 void
171 ComputeRegionInTileBoundaries(unsigned int dimension, SizeValueType tileSize, ImageIORegion & streamableRegion) const;
172};
173} // end namespace itk
174
175#endif // itkJPEG2000ImageIO_h
itk::intmax_t SizeType
An ImageIORegion represents a structured region of data.
itk::SizeValueType SizeValueType
itk::IndexValueType IndexValueType
Control indentation during Print() invocation.
Definition itkIndent.h:50
This class contains all enum classes used by JPEG2000ImageIOInternal class.
void WriteImageInformation() override
StreamingImageIOBase Superclass
SmartPointer< Self > Pointer
void SetTileSize(int x, int y)
void ComputeRegionInTileBoundaries(unsigned int dimension, SizeValueType tileSize, ImageIORegion &streamableRegion) const
~JPEG2000ImageIO() override
void Write(const void *buffer) override
bool CanStreamWrite() override
ImageIORegion::IndexValueType IndexValueType
bool CanWriteFile(const char *) override
void Read(void *buffer) override
void PrintSelf(std::ostream &os, Indent indent) const override
bool CanReadFile(const char *) override
std::unique_ptr< JPEG2000ImageIOInternal > m_Internal
SizeType GetHeaderSize() const override
void ReadImageInformation() override
ImageIORegion GenerateStreamableReadRegionFromRequestedRegion(const ImageIORegion &requestedRegion) const override
ImageIORegion::SizeValueType SizeValueType
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)