VTK
vtkMPIImageReader.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 /*=========================================================================
3 
4  Program: Visualization Toolkit
5  Module: vtkMPIImageReader.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 
51 #ifndef vtkMPIImageReader_h
52 #define vtkMPIImageReader_h
53 
54 #include "vtkIOMPIImageModule.h" // For export macro
55 #include "vtkImageReader.h"
56 
57 class vtkMPIOpaqueFileHandle;
59 
60 class VTKIOMPIIMAGE_EXPORT vtkMPIImageReader : public vtkImageReader
61 {
62 public:
65  virtual void PrintSelf(ostream &os, vtkIndent indent) override;
66 
68 
72  vtkGetObjectMacro(Controller, vtkMultiProcessController);
75 
76 protected:
79 
81 
86 
92  virtual void PartitionController(const int extent[6]);
93 
98  virtual unsigned long GetHeaderSize(vtkMPIOpaqueFileHandle &file);
99 
106  virtual void SetupFileView(vtkMPIOpaqueFileHandle &file, const int extent[6]);
107 
114  virtual void ReadSlice(int slice, const int extent[6], void *buffer);
115 
121 
123 
130 
132  vtkInformation *outInfo) override;
133 
134 private:
135  vtkMPIImageReader(const vtkMPIImageReader &) = delete;
136  void operator=(const vtkMPIImageReader &) = delete;
137 };
138 
139 #endif //vtkMPIImageReader_h
vtkMPIImageReader::SetGroupedController
void SetGroupedController(vtkMultiProcessController *)
A group of processes that are reading the same file (as determined by PartitionController.
vtkImageReader
Superclass of transformable binary file readers.
Definition: vtkImageReader.h:45
vtkMPIImageReader::SetupFileView
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...
vtkMPIImageReader::PartitionController
virtual void PartitionController(const int extent[6])
Break up the controller based on the files each process reads.
vtkX3D::data
@ data
Definition: vtkX3D.h:315
vtkMPIImageReader::GroupedController
vtkMultiProcessController * GroupedController
Definition: vtkMPIImageReader.h:128
vtkMPIImageReader::ExecuteDataWithInformation
virtual void ExecuteDataWithInformation(vtkDataObject *data, vtkInformation *outInfo) override
This is a convenience method that is implemented in many subclasses instead of RequestData.
vtkMPIImageReader::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMPIImageReader::New
static vtkMPIImageReader * New()
vtkMultiProcessController
Multiprocessing communication superclass.
Definition: vtkMultiProcessController.h:83
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkMPIImageReader::SetController
virtual void SetController(vtkMultiProcessController *)
vtkMPIImageReader::Controller
vtkMultiProcessController * Controller
Definition: vtkMPIImageReader.h:80
vtkMPIImageReader::ReadSlice
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,...
vtkMPIImageReader::GetHeaderSize
virtual unsigned long GetHeaderSize(vtkMPIOpaqueFileHandle &file)
Get the header size of the given open file.
vtkMPIImageReader::~vtkMPIImageReader
~vtkMPIImageReader()
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkMPIImageReader::GetDataScalarTypeSize
int GetDataScalarTypeSize()
Returns the size, in bytes of the scalar data type (GetDataScalarType).
vtkMPIImageReader::vtkMPIImageReader
vtkMPIImageReader()
vtkMPIImageReader::TransformData
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...
vtkX3D::extent
@ extent
Definition: vtkX3D.h:345
vtkImageReader.h
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
vtkMPIImageReader
Definition: vtkMPIImageReader.h:61