18 #ifndef itkRawImageIO_h
19 #define itkRawImageIO_h
47 template<
typename TPixel,
unsigned int VImageDimension = 2 >
84 itkSetMacro(FileDimensionality,
unsigned long);
85 itkGetConstMacro(FileDimensionality,
unsigned long);
94 {
return ( dim == m_FileDimensionality ); }
101 virtual bool CanReadFile(
const char *) ITK_OVERRIDE {
return false; }
108 virtual void Read(
void *buffer) ITK_OVERRIDE;
111 itkGetConstReferenceMacro(ImageMask,
unsigned short);
114 if ( val == m_ImageMask ) {
return; }
115 m_ImageMask = ( (
unsigned short)( val ) );
121 virtual void ReadHeader(
const std::string = std::string() ) {}
128 virtual bool CanWriteFile(
const char *) ITK_OVERRIDE;
131 virtual
void WriteImageInformation(
void) ITK_OVERRIDE {
return; }
134 virtual void Write(
const void *buffer) ITK_OVERRIDE;
139 virtual
void PrintSelf(std::ostream & os,
Indent indent) const ITK_OVERRIDE;
146 std::
string m_InternalFileName;
148 unsigned long m_FileDimensionality;
149 bool m_ManualHeaderSize;
151 unsigned short m_ImageMask;
154 template< typename TPixel,
unsigned int VImageDimension >
172 return "Raw ImageIO Factory, allows the loading of Raw images into insight";
176 itkFactorylessNewMacro(Self);
198 #ifndef ITK_MANUAL_INSTANTIATION
199 #include "itkRawImageIO.hxx"
Superclass::SizeValueType SizeValueType
Light weight base class for most itk classes.
virtual bool CanReadFile(const char *) override
TPixelType::ValueType ValueType
#define ITK_SOURCE_VERSION
SmartPointer< Self > Pointer
Abstract superclass defines image IO interface.
SmartPointer< const Self > ConstPointer
ObjectFactoryBase Superclass
Create instances of classes using an object factory.
virtual const char * GetDescription(void) const override
RawImageIO< TPixel, VImageDimension > myProductType
SmartPointer< Self > Pointer
const myProductType * m_MyProduct
ByteSwapper< ComponentType > ByteSwapperType
RawImageIOFactory< TPixel, VImageDimension > Self
::itk::SizeValueType SizeValueType
virtual bool SupportsDimension(unsigned long dim) override
static void RegisterOneFactory(void)
Read and write raw binary images.
virtual const char * GetITKSourceVersion(void) const override
static bool RegisterFactory(ObjectFactoryBase *, InsertionPositionType where=INSERT_AT_BACK, vcl_size_t position=0)
void SetImageMask(unsigned long val)
Control indentation during Print() invocation.
PixelTraits< PixelType >::ValueType ComponentType
virtual void ReadHeader(const std::string=std::string())
virtual void ReadImageInformation() override
Perform machine dependent byte swapping.