VTK  9.3.20240419
vtkMetaImageWriter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
92 #ifndef vtkMetaImageWriter_h
93 #define vtkMetaImageWriter_h
94 
95 #include "vtkIOImageModule.h" // For export macro
96 #include "vtkImageWriter.h"
97 
98 namespace vtkmetaio
99 {
100 class MetaImage;
101 } // forward declaration
102 
103 VTK_ABI_NAMESPACE_BEGIN
104 class VTKIOIMAGE_EXPORT vtkMetaImageWriter : public vtkImageWriter
105 {
106 public:
108  void PrintSelf(ostream& os, vtkIndent indent) override;
109 
114 
118  void SetFileName(VTK_FILEPATH const char* fname) override;
119  VTK_FILEPATH VTK_FUTURE_CONST char* GetFileName() VTK_FUTURE_CONST override
120  {
121  return this->MHDFileName;
122  }
123 
125 
128  virtual void SetRAWFileName(VTK_FILEPATH const char* fname);
129  virtual VTK_FILEPATH VTK_FUTURE_CONST char* GetRAWFileName() VTK_FUTURE_CONST;
131 
132  virtual void SetCompression(bool compress) { this->Compress = compress; }
133  virtual bool GetCompression() { return this->Compress; }
134 
135  // This is called by the superclass.
136  // This is the method you should override.
137  void Write() override;
138 
139 protected:
142 
143  vtkSetFilePathMacro(MHDFileName);
144  char* MHDFileName;
145  bool Compress;
146 
147 private:
148  vtkMetaImageWriter(const vtkMetaImageWriter&) = delete;
149  void operator=(const vtkMetaImageWriter&) = delete;
150 
151  vtkmetaio::MetaImage* MetaImagePtr;
152 };
153 
154 VTK_ABI_NAMESPACE_END
155 #endif
Writes images to files.
a simple class to control print indentation
Definition: vtkIndent.h:108
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 VTK_FILEPATH VTK_FUTURE_CONST char * GetRAWFileName() VTK_FUTURE_CONST
Specify the file name of the raw image data.
virtual bool GetCompression()
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