VTK  9.5.20250715
vtkPNrrdReader.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
27#ifndef vtkPNrrdReader_h
28#define vtkPNrrdReader_h
29
30#include "vtkIOMPIImageModule.h" // For export macro
31#include "vtkNrrdReader.h"
32
33VTK_ABI_NAMESPACE_BEGIN
34class vtkCharArray;
36class vtkMPIOpaqueFileHandle;
37
38class VTKIOMPIIMAGE_EXPORT vtkPNrrdReader : public vtkNrrdReader
39{
40public:
43 void PrintSelf(ostream& os, vtkIndent indent) override;
44
46
50 vtkGetObjectMacro(Controller, vtkMultiProcessController);
53
54protected:
56 ~vtkPNrrdReader() override;
57
58 int ReadHeader() override;
59 int ReadHeader(vtkCharArray* headerBuffer) override;
60
65
71 virtual void PartitionController(const int extent[6]);
72
77 virtual unsigned long GetHeaderSize(vtkMPIOpaqueFileHandle& file);
78
85 virtual void SetupFileView(vtkMPIOpaqueFileHandle& file, const int extent[6]);
86
93 virtual void ReadSlice(int slice, const int extent[6], void* buffer);
94
99 virtual void TransformData(vtkImageData* data);
100
102
109
111
113
114private:
115 vtkPNrrdReader(const vtkPNrrdReader&) = delete;
116 void operator=(const vtkPNrrdReader&) = delete;
117};
118
119VTK_ABI_NAMESPACE_END
120#endif // vtkPNrrdReader_h
dynamic, self-adjusting array of char
general representation of visualization data
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:108
Store vtkAlgorithm input/output information.
Multiprocessing communication superclass.
Read nrrd files file system.
Read nrrd files efficiently from parallel file systems (and reasonably well elsewhere).
virtual unsigned long GetHeaderSize(vtkMPIOpaqueFileHandle &file)
Get the header size of the given open file.
vtkMultiProcessController * Controller
int ReadHeader(vtkCharArray *headerBuffer) override
int ReadHeader() override
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,...
~vtkPNrrdReader() override
virtual void PartitionController(const int extent[6])
Break up the controller based on the files each process reads.
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 TransformData(vtkImageData *data)
Transform the data from the order read from a file to the order to place in the output data (as defin...
int GetDataScalarTypeSize()
Returns the size, in bytes of the scalar data type (GetDataScalarType).
static vtkPNrrdReader * New()
void SetGroupedController(vtkMultiProcessController *)
A group of processes that are reading the same file (as determined by PartitionController.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMultiProcessController * GroupedController
A group of processes that are reading the same file (as determined by PartitionController.
virtual void SetController(vtkMultiProcessController *)
Get/set the multi process controller to use for coordinated reads.
void ExecuteDataWithInformation(vtkDataObject *data, vtkInformation *outInfo) override
This is a convenience method that is implemented in many subclasses instead of RequestData.