VTK  9.3.1
vtkMPIImageReader.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 
35 #ifndef vtkMPIImageReader_h
36 #define vtkMPIImageReader_h
37 
38 #include "vtkIOMPIImageModule.h" // For export macro
39 #include "vtkImageReader.h"
40 
41 VTK_ABI_NAMESPACE_BEGIN
42 class vtkMPIOpaqueFileHandle;
44 
45 class VTKIOMPIIMAGE_EXPORT vtkMPIImageReader : public vtkImageReader
46 {
47 public:
49  static vtkMPIImageReader* New();
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
53 
57  vtkGetObjectMacro(Controller, vtkMultiProcessController);
58  virtual void SetController(vtkMultiProcessController*);
60 
61 protected:
63  ~vtkMPIImageReader() override;
64 
66 
70  int GetDataScalarTypeSize();
71 
77  virtual void PartitionController(const int extent[6]);
78 
83  virtual unsigned long GetHeaderSize(vtkMPIOpaqueFileHandle& file);
84 
91  virtual void SetupFileView(vtkMPIOpaqueFileHandle& file, const int extent[6]);
92 
99  virtual void ReadSlice(int slice, const int extent[6], void* buffer);
100 
105  virtual void TransformData(vtkImageData* data);
106 
108 
112  void SetGroupedController(vtkMultiProcessController*);
115 
117 
118 private:
119  vtkMPIImageReader(const vtkMPIImageReader&) = delete;
120  void operator=(const vtkMPIImageReader&) = delete;
121 };
122 
123 VTK_ABI_NAMESPACE_END
124 #endif // vtkMPIImageReader_h
Store vtkAlgorithm input/output information.
vtkMultiProcessController * GroupedController
A group of processes that are reading the same file (as determined by PartitionController.
unsigned long GetHeaderSize()
Get the size of the header computed by this object.
static vtkImageReader * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMPIImageReader provides the mechanism to read a brick of bytes (or shorts, or ints, or floats, or doubles, ...) from a file or series of files.
a simple class to control print indentation
Definition: vtkIndent.h:28
Superclass of transformable binary file readers.
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
vtkMultiProcessController * Controller
void ExecuteDataWithInformation(vtkDataObject *data, vtkInformation *outInfo) override
This is a convenience method that is implemented in many subclasses instead of RequestData.
general representation of visualization data
Definition: vtkDataObject.h:54
Multiprocessing communication superclass.