VTK
vtkJSONImageWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkJSONImageWriter.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 =========================================================================*/
26 #ifndef vtkJSONImageWriter_h
27 #define vtkJSONImageWriter_h
28 
29 #include "vtkIOImageModule.h" // For export macro
30 #include "vtkImageAlgorithm.h"
31 
32 class VTKIOIMAGE_EXPORT vtkJSONImageWriter : public vtkImageAlgorithm
33 {
34 public:
35  static vtkJSONImageWriter *New();
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
40 
43  vtkSetStringMacro(FileName);
44  vtkGetStringMacro(FileName);
46 
48 
51  vtkSetStringMacro(ArrayName);
52  vtkGetStringMacro(ArrayName);
54 
56 
59  vtkSetMacro(Slice, int);
60  vtkGetMacro(Slice, int);
62 
66  virtual void Write();
67 
68 protected:
70  ~vtkJSONImageWriter() override;
71 
72  char *FileName;
73  char *ArrayName;
74  int Slice;
75 
76  int RequestData(vtkInformation *request,
77  vtkInformationVector** inputVector,
78  vtkInformationVector* outputVector) override;
79 
80 private:
81  vtkJSONImageWriter(const vtkJSONImageWriter&) = delete;
82  void operator=(const vtkJSONImageWriter&) = delete;
83 };
84 
85 #endif
vtkImageAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkImageAlgorithm.h
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:40
vtkJSONImageWriter
Writes vtkImageData to a JSON file.
Definition: vtkJSONImageWriter.h:32
vtkJSONImageWriter::FileName
char * FileName
Definition: vtkJSONImageWriter.h:72
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkJSONImageWriter::Slice
int Slice
Definition: vtkJSONImageWriter.h:74
vtkImageAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkJSONImageWriter::ArrayName
char * ArrayName
Definition: vtkJSONImageWriter.h:73