18 #ifndef itkDCMTKImageIO_h
19 #define itkDCMTKImageIO_h
20 #include "ITKIODCMTKExport.h"
59 extern ITKIODCMTK_EXPORT std::ostream &
88 #if !defined(ITK_LEGACY_REMOVE)
90 static constexpr
LogLevelEnum TRACE_LOG_LEVEL = LogLevelEnum::TRACE_LOG_LEVEL;
91 static constexpr
LogLevelEnum DEBUG_LOG_LEVEL = LogLevelEnum::DEBUG_LOG_LEVEL;
92 static constexpr
LogLevelEnum INFO_LOG_LEVEL = LogLevelEnum::INFO_LOG_LEVEL;
93 static constexpr
LogLevelEnum WARN_LOG_LEVEL = LogLevelEnum::WARN_LOG_LEVEL;
94 static constexpr
LogLevelEnum ERROR_LOG_LEVEL = LogLevelEnum::ERROR_LOG_LEVEL;
95 static constexpr
LogLevelEnum FATAL_LOG_LEVEL = LogLevelEnum::FATAL_LOG_LEVEL;
96 static constexpr
LogLevelEnum OFF_LOG_LEVEL = LogLevelEnum::OFF_LOG_LEVEL;
103 m_DImage = UserProvided;
104 m_DicomImageSetByUser =
true;
112 CanReadFile(
const char *)
override;
116 ReadImageInformation()
override;
120 Read(
void * buffer)
override;
127 CanWriteFile(
const char *)
override;
131 WriteImageInformation()
override;
136 Write(
const void * buffer)
override;
140 SetLogLevel(LogLevelEnum level);
149 PrintSelf(std::ostream & os,
Indent indent)
const override;
157 ReorderRGBValues(
void * buffer,
const void * data,
size_t count,
unsigned int voxel_size);
164 template <
typename T>
168 auto * output_buffer = static_cast<T *>(buffer);
169 const auto ** input_buffer = static_cast<const T **>(const_cast<void *>(data));
170 for (
size_t pos = 0; pos < count; ++pos)
172 for (
unsigned int color = 0; color < voxel_size; ++color)
174 *(output_buffer++) = input_buffer[color][pos];
195 extern ITKCommon_EXPORT std::ostream &
200 #endif // itkDCMTKImageIO_h