VTK  9.0.1
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 =========================================================================*/
62 #ifndef vtkMetaImageWriter_h
63 #define vtkMetaImageWriter_h
64 
65 #include "vtkIOImageModule.h" // For export macro
66 #include "vtkImageWriter.h"
67 
68 namespace vtkmetaio
69 {
70 class MetaImage;
71 } // forward declaration
72 
73 class VTKIOIMAGE_EXPORT vtkMetaImageWriter : public vtkImageWriter
74 {
75 public:
77  void PrintSelf(ostream& os, vtkIndent indent) override;
78 
83 
87  void SetFileName(const char* fname) override;
88  char* GetFileName() override { return this->MHDFileName; }
89 
91 
94  virtual void SetRAWFileName(const char* fname);
95  virtual char* GetRAWFileName();
97 
98  virtual void SetCompression(bool compress) { this->Compress = compress; }
99  virtual bool GetCompression(void) { return this->Compress; }
100 
101  // This is called by the superclass.
102  // This is the method you should override.
103  void Write() override;
104 
105 protected:
108 
109  vtkSetStringMacro(MHDFileName);
110  char* MHDFileName;
111  bool Compress;
112 
113 private:
114  vtkMetaImageWriter(const vtkMetaImageWriter&) = delete;
115  void operator=(const vtkMetaImageWriter&) = delete;
116 
117  vtkmetaio::MetaImage* MetaImagePtr;
118 };
119 
120 #endif
Writes images to files.
a simple class to control print indentation
Definition: vtkIndent.h:34
write a binary UNC meta image data
void Write() override
The main interface which triggers the writer to start.
virtual char * GetRAWFileName()
~vtkMetaImageWriter() override
virtual void SetRAWFileName(const char *fname)
Specify the file name of the raw image data.
virtual void SetCompression(bool compress)
virtual bool GetCompression(void)
static vtkMetaImageWriter * New()
Construct object with FlipNormals turned off and Normals set to true.
char * GetFileName() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetFileName(const char *fname) override
Specify file name of meta file.