VTK  9.2.6
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 =========================================================================*/
65 #ifndef vtkMetaImageWriter_h
66 #define vtkMetaImageWriter_h
67 
68 #include "vtkIOImageModule.h" // For export macro
69 #include "vtkImageWriter.h"
70 
71 namespace vtkmetaio
72 {
73 class MetaImage;
74 } // forward declaration
75 
76 class VTKIOIMAGE_EXPORT vtkMetaImageWriter : public vtkImageWriter
77 {
78 public:
80  void PrintSelf(ostream& os, vtkIndent indent) override;
81 
85  static vtkMetaImageWriter* New();
86 
90  void SetFileName(VTK_FILEPATH const char* fname) override;
91  VTK_FILEPATH VTK_FUTURE_CONST char* GetFileName() VTK_FUTURE_CONST override
92  {
93  return this->MHDFileName;
94  }
95 
97 
100  virtual void SetRAWFileName(VTK_FILEPATH const char* fname);
101  virtual VTK_FILEPATH VTK_FUTURE_CONST char* GetRAWFileName() VTK_FUTURE_CONST;
103 
104  virtual void SetCompression(bool compress) { this->Compress = compress; }
105  virtual bool GetCompression(void) { return this->Compress; }
106 
107  // This is called by the superclass.
108  // This is the method you should override.
109  void Write() override;
110 
111 protected:
113  ~vtkMetaImageWriter() override;
114 
115  vtkSetFilePathMacro(MHDFileName);
116  char* MHDFileName;
117  bool Compress;
118 
119 private:
120  vtkMetaImageWriter(const vtkMetaImageWriter&) = delete;
121  void operator=(const vtkMetaImageWriter&) = delete;
122 
123  vtkmetaio::MetaImage* MetaImagePtr;
124 };
125 
126 #endif
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:39
virtual void Write()
The main interface which triggers the writer to start.
Writes images to files.
virtual bool GetCompression(void)
static vtkImageWriter * New()
write a binary UNC meta image data
#define VTK_FILEPATH