VTK  9.5.20251008
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
37#ifndef vtkMPIImageReader_h
38#define vtkMPIImageReader_h
39
40#include "vtkIOMPIImageModule.h" // For export macro
41#include "vtkImageReader.h"
42
43VTK_ABI_NAMESPACE_BEGIN
44class vtkMPIOpaqueFileHandle;
46
47class VTKIOMPIIMAGE_EXPORT vtkMPIImageReader : public vtkImageReader
48{
49public:
52 void PrintSelf(ostream& os, vtkIndent indent) override;
53
55
59 vtkGetObjectMacro(Controller, vtkMultiProcessController);
62
63protected:
66
68
73
79 virtual void PartitionController(const int extent[6]);
80
85 virtual unsigned long GetHeaderSize(vtkMPIOpaqueFileHandle& file);
86
93 virtual void SetupFileView(vtkMPIOpaqueFileHandle& file, const int extent[6]);
94
101 virtual void ReadSlice(int slice, const int extent[6], void* buffer);
102
107 virtual void TransformData(vtkImageData* data);
108
110
117
119
120private:
121 vtkMPIImageReader(const vtkMPIImageReader&) = delete;
122 void operator=(const vtkMPIImageReader&) = delete;
123};
124
125VTK_ABI_NAMESPACE_END
126#endif // vtkMPIImageReader_h
general representation of visualization data
topologically and geometrically regular array of data
Superclass of transformable binary file readers.
a simple class to control print indentation
Definition vtkIndent.h:108
Store vtkAlgorithm input/output information.
vtkMPIImageReader provides the mechanism to read a brick of bytes (or shorts, or ints,...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void TransformData(vtkImageData *data)
Transform the data from the order read from a file to the order to place in the output data (as defin...
vtkMultiProcessController * Controller
void SetGroupedController(vtkMultiProcessController *)
A group of processes that are reading the same file (as determined by PartitionController.
void ExecuteDataWithInformation(vtkDataObject *data, vtkInformation *outInfo) override
This is a convenience method that is implemented in many subclasses instead of RequestData.
~vtkMPIImageReader() override
vtkMultiProcessController * GroupedController
A group of processes that are reading the same file (as determined by PartitionController.
int GetDataScalarTypeSize()
Returns the size, in bytes of the scalar data type (GetDataScalarType).
virtual void SetupFileView(vtkMPIOpaqueFileHandle &file, const int extent[6])
Set up a "view" on the open file that will allow you to read the 2D or 3D subarray from the file in o...
virtual void PartitionController(const int extent[6])
Break up the controller based on the files each process reads.
virtual void ReadSlice(int slice, const int extent[6], void *buffer)
Given a slice of the data, open the appropriate file, read the data into given buffer,...
static vtkMPIImageReader * New()
virtual void SetController(vtkMultiProcessController *)
Get/set the multi process controller to use for coordinated reads.
virtual unsigned long GetHeaderSize(vtkMPIOpaqueFileHandle &file)
Get the header size of the given open file.
Multiprocessing communication superclass.