VTK  9.3.1
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
53 #ifndef vtkMetaImageWriter_h
54 #define vtkMetaImageWriter_h
55 
56 #include "vtkIOImageModule.h" // For export macro
57 #include "vtkImageWriter.h"
58 
59 namespace vtkmetaio
60 {
61 class MetaImage;
62 } // forward declaration
63 
64 VTK_ABI_NAMESPACE_BEGIN
65 class VTKIOIMAGE_EXPORT vtkMetaImageWriter : public vtkImageWriter
66 {
67 public:
69  void PrintSelf(ostream& os, vtkIndent indent) override;
70 
74  static vtkMetaImageWriter* New();
75 
79  void SetFileName(VTK_FILEPATH const char* fname) override;
80  VTK_FILEPATH VTK_FUTURE_CONST char* GetFileName() VTK_FUTURE_CONST override
81  {
82  return this->MHDFileName;
83  }
84 
86 
89  virtual void SetRAWFileName(VTK_FILEPATH const char* fname);
90  virtual VTK_FILEPATH VTK_FUTURE_CONST char* GetRAWFileName() VTK_FUTURE_CONST;
92 
93  virtual void SetCompression(bool compress) { this->Compress = compress; }
94  virtual bool GetCompression() { return this->Compress; }
95 
96  // This is called by the superclass.
97  // This is the method you should override.
98  void Write() override;
99 
100 protected:
102  ~vtkMetaImageWriter() override;
103 
104  vtkSetFilePathMacro(MHDFileName);
105  char* MHDFileName;
106  bool Compress;
107 
108 private:
109  vtkMetaImageWriter(const vtkMetaImageWriter&) = delete;
110  void operator=(const vtkMetaImageWriter&) = delete;
111 
112  vtkmetaio::MetaImage* MetaImagePtr;
113 };
114 
115 VTK_ABI_NAMESPACE_END
116 #endif
virtual bool GetCompression()
vtkSetFilePathMacro(FileName)
Specify file name for the image 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.
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual void Write()
The main interface which triggers the writer to start.
Writes images to files.
static vtkImageWriter * New()
write a binary UNC meta image data
#define VTK_FILEPATH