VTK  9.3.1
vtkJSONImageWriter.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
14 #ifndef vtkJSONImageWriter_h
15 #define vtkJSONImageWriter_h
16 
17 #include "vtkIOImageModule.h" // For export macro
18 #include "vtkImageAlgorithm.h"
19 
20 VTK_ABI_NAMESPACE_BEGIN
21 class VTKIOIMAGE_EXPORT vtkJSONImageWriter : public vtkImageAlgorithm
22 {
23 public:
24  static vtkJSONImageWriter* New();
26  void PrintSelf(ostream& os, vtkIndent indent) override;
27 
29 
32  vtkSetFilePathMacro(FileName);
33  vtkGetFilePathMacro(FileName);
35 
37 
40  vtkSetStringMacro(ArrayName);
41  vtkGetStringMacro(ArrayName);
43 
45 
48  vtkSetMacro(Slice, int);
49  vtkGetMacro(Slice, int);
51 
55  virtual void Write();
56 
57 protected:
59  ~vtkJSONImageWriter() override;
60 
61  char* FileName;
62  char* ArrayName;
63  int Slice;
64 
65  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
66  vtkInformationVector* outputVector) override;
67 
68 private:
69  vtkJSONImageWriter(const vtkJSONImageWriter&) = delete;
70  void operator=(const vtkJSONImageWriter&) = delete;
71 };
72 
73 VTK_ABI_NAMESPACE_END
74 #endif
Store vtkAlgorithm input/output information.
a simple class to control print indentation
Definition: vtkIndent.h:28
Writes vtkImageData to a JSON file.
Generic algorithm superclass for image algs.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.