VTK  9.0.2
vtkPNrrdReader.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 /*=========================================================================
3 
4  Program: Visualization Toolkit
5  Module: vtkPNrrdReader.h
6 
7  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
8  All rights reserved.
9  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
10 
11  This software is distributed WITHOUT ANY WARRANTY; without even
12  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13  PURPOSE. See the above copyright notice for more information.
14 
15 =========================================================================*/
16 /*----------------------------------------------------------------------------
17  Copyright (c) Sandia Corporation
18  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
19 ----------------------------------------------------------------------------*/
20 
40 #ifndef vtkPNrrdReader_h
41 #define vtkPNrrdReader_h
42 
43 #include "vtkIOMPIImageModule.h" // For export macro
44 #include "vtkNrrdReader.h"
45 
46 class vtkCharArray;
48 class vtkMPIOpaqueFileHandle;
49 
50 class VTKIOMPIIMAGE_EXPORT vtkPNrrdReader : public vtkNrrdReader
51 {
52 public:
53  vtkTypeMacro(vtkPNrrdReader, vtkNrrdReader);
54  static vtkPNrrdReader* New();
55  virtual void PrintSelf(ostream& os, vtkIndent indent) override;
56 
58 
62  vtkGetObjectMacro(Controller, vtkMultiProcessController);
65 
66 protected:
68  ~vtkPNrrdReader() override;
69 
70  virtual int ReadHeader() override;
71  virtual int ReadHeader(vtkCharArray* headerBuffer) override;
72 
77 
83  virtual void PartitionController(const int extent[6]);
84 
89  virtual unsigned long GetHeaderSize(vtkMPIOpaqueFileHandle& file);
90 
97  virtual void SetupFileView(vtkMPIOpaqueFileHandle& file, const int extent[6]);
98 
105  virtual void ReadSlice(int slice, const int extent[6], void* buffer);
106 
112 
114 
121 
122  virtual void ExecuteDataWithInformation(vtkDataObject* data, vtkInformation* outInfo) override;
123 
125 
126 private:
127  vtkPNrrdReader(const vtkPNrrdReader&) = delete;
128  void operator=(const vtkPNrrdReader&) = delete;
129 };
130 
131 #endif // vtkPNrrdReader_h
dynamic, self-adjusting array of char
Definition: vtkCharArray.h:36
general representation of visualization data
Definition: vtkDataObject.h:60
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
a simple class to control print indentation
Definition: vtkIndent.h:34
Store vtkAlgorithm input/output information.
Multiprocessing communication superclass.
Read nrrd files file system.
Definition: vtkNrrdReader.h:45
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
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...
static vtkPNrrdReader * New()
virtual int ReadHeader(vtkCharArray *headerBuffer) override
int GetDataScalarTypeSize()
Returns the size, in bytes of the scalar data type (GetDataScalarType).
void SetGroupedController(vtkMultiProcessController *)
A group of processes that are reading the same file (as determined by PartitionController.
virtual void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMultiProcessController * GroupedController
virtual void SetController(vtkMultiProcessController *)
virtual int ReadHeader() override
virtual void ExecuteDataWithInformation(vtkDataObject *data, vtkInformation *outInfo) override
This is a convenience method that is implemented in many subclasses instead of RequestData.
@ extent
Definition: vtkX3D.h:351
@ data
Definition: vtkX3D.h:321