VTK  9.2.5
vtkMetaImageWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMetaImageWriter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
104 #ifndef vtkMetaImageWriter_h
105 #define vtkMetaImageWriter_h
106 
107 #include "vtkIOImageModule.h" // For export macro
108 #include "vtkImageWriter.h"
109 
110 namespace vtkmetaio
111 {
112 class MetaImage;
113 } // forward declaration
114 
115 class VTKIOIMAGE_EXPORT vtkMetaImageWriter : public vtkImageWriter
116 {
117 public:
119  void PrintSelf(ostream& os, vtkIndent indent) override;
120 
125 
129  void SetFileName(VTK_FILEPATH const char* fname) override;
130  VTK_FILEPATH VTK_FUTURE_CONST char* GetFileName() VTK_FUTURE_CONST override
131  {
132  return this->MHDFileName;
133  }
134 
136 
139  virtual void SetRAWFileName(VTK_FILEPATH const char* fname);
140  virtual VTK_FILEPATH VTK_FUTURE_CONST char* GetRAWFileName() VTK_FUTURE_CONST;
142 
143  virtual void SetCompression(bool compress) { this->Compress = compress; }
144  virtual bool GetCompression(void) { return this->Compress; }
145 
146  // This is called by the superclass.
147  // This is the method you should override.
148  void Write() override;
149 
150 protected:
153 
154  vtkSetFilePathMacro(MHDFileName);
155  char* MHDFileName;
156  bool Compress;
157 
158 private:
159  vtkMetaImageWriter(const vtkMetaImageWriter&) = delete;
160  void operator=(const vtkMetaImageWriter&) = delete;
161 
162  vtkmetaio::MetaImage* MetaImagePtr;
163 };
164 
165 #endif
Writes images to files.
a simple class to control print indentation
Definition: vtkIndent.h:119
write a binary UNC meta image data
virtual void SetRAWFileName(VTK_FILEPATH const char *fname)
Specify the file name of the raw image data.
vtkSetFilePathMacro(MHDFileName)
void Write() override
The main interface which triggers the writer to start.
~vtkMetaImageWriter() override
virtual bool GetCompression(void)
virtual VTK_FILEPATH VTK_FUTURE_CONST char * GetRAWFileName() VTK_FUTURE_CONST
Specify the file name of the raw image data.
static vtkMetaImageWriter * New()
Construct object with FlipNormals turned off and Normals set to true.
void SetFileName(VTK_FILEPATH const char *fname) override
Specify file name of meta file.
VTK_FILEPATH VTK_FUTURE_CONST char * GetFileName() VTK_FUTURE_CONST override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define VTK_FILEPATH