VTK
|
#include <vtkMPIImageReader.h>
Public Types | |
typedef vtkImageReader | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkMPIImageReader * | NewInstance () const |
virtual void | PrintSelf (ostream &os, vtkIndent indent) |
virtual vtkMultiProcessController * | GetController () |
virtual void | SetController (vtkMultiProcessController *) |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkMPIImageReader * | SafeDownCast (vtkObjectBase *o) |
static vtkMPIImageReader * | New () |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkMPIImageReader () | |
~vtkMPIImageReader () | |
int | GetDataScalarTypeSize () |
virtual void | PartitionController (const int extent[6]) |
virtual unsigned long | GetHeaderSize (vtkMPIOpaqueFileHandle &file) |
virtual void | SetupFileView (vtkMPIOpaqueFileHandle &file, const int extent[6]) |
virtual void | ReadSlice (int slice, const int extent[6], void *buffer) |
virtual void | TransformData (vtkImageData *data) |
virtual void | ExecuteDataWithInformation (vtkDataObject *data, vtkInformation *outInfo) |
Protected Attributes | |
vtkMultiProcessController * | Controller |
vtkMultiProcessController * | GroupedController |
void | SetGroupedController (vtkMultiProcessController *) |
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. You can use it to read raw image data from files. You may also be able to subclass this to read simple file formats.
What distinguishes this class from vtkImageReader and vtkImageReader2 is that it performs synchronized parallel I/O using the MPIIO layer. This can make a huge difference in file read times, especially when reading in parallel from a parallel file system.
Despite the name of this class, vtkMPIImageReader will work even if MPI is not available. If MPI is not available or MPIIO is not available or the given Controller is not a vtkMPIController (or NULL), then this class will silently work exactly like its superclass. The point is that you can safely use this class in applications that may or may not be compiled with MPI (or may or may not actually be run with MPI).
Definition at line 56 of file vtkMPIImageReader.h.
Reimplemented from vtkImageReader.
Definition at line 59 of file vtkMPIImageReader.h.
vtkMPIImageReader::vtkMPIImageReader | ( | ) | [protected] |
vtkMPIImageReader::~vtkMPIImageReader | ( | ) | [protected] |
static int vtkMPIImageReader::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkImageReader.
virtual int vtkMPIImageReader::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkImageReader.
static vtkMPIImageReader* vtkMPIImageReader::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkImageReader.
virtual vtkObjectBase* vtkMPIImageReader::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkImageReader.
vtkMPIImageReader* vtkMPIImageReader::NewInstance | ( | ) | const |
Reimplemented from vtkImageReader.
static vtkMPIImageReader* vtkMPIImageReader::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkImageReader.
virtual void vtkMPIImageReader::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkImageReader.
virtual vtkMultiProcessController* vtkMPIImageReader::GetController | ( | ) | [virtual] |
Get/set the multi process controller to use for coordinated reads. By default, set to the global controller.
virtual void vtkMPIImageReader::SetController | ( | vtkMultiProcessController * | ) | [virtual] |
Get/set the multi process controller to use for coordinated reads. By default, set to the global controller.
int vtkMPIImageReader::GetDataScalarTypeSize | ( | ) | [protected] |
Returns the size, in bytes of the scalar data type (GetDataScalarType).
virtual void vtkMPIImageReader::PartitionController | ( | const int | extent[6] | ) | [protected, virtual] |
Break up the controller based on the files each process reads. Each group comprises the processes that read the same files in the same order. this->GroupedController is set to the group for the current process.
virtual unsigned long vtkMPIImageReader::GetHeaderSize | ( | vtkMPIOpaqueFileHandle & | file | ) | [protected, virtual] |
Get the header size of the given open file. This should be used in liu of the GetHeaderSize methods of the superclass.
virtual void vtkMPIImageReader::SetupFileView | ( | vtkMPIOpaqueFileHandle & | file, |
const int | extent[6] | ||
) | [protected, virtual] |
Set up a "view" on the open file that will allow you to read the 2D or 3D subarray from the file in one read. Once you call this method, the file will look as if it contains only the data the local process needs to read in.
virtual void vtkMPIImageReader::ReadSlice | ( | int | slice, |
const int | extent[6], | ||
void * | buffer | ||
) | [protected, virtual] |
Given a slice of the data, open the appropriate file, read the data into given buffer, and close the file. For three dimensional data, always use "slice" 0. Make sure the GroupedController is properly created before calling this using the PartitionController method.
virtual void vtkMPIImageReader::TransformData | ( | vtkImageData * | data | ) | [protected, virtual] |
Transform the data from the order read from a file to the order to place in the output data (as defined by the transform).
void vtkMPIImageReader::SetGroupedController | ( | vtkMultiProcessController * | ) | [protected] |
A group of processes that are reading the same file (as determined by PartitionController.
virtual void vtkMPIImageReader::ExecuteDataWithInformation | ( | vtkDataObject * | output, |
vtkInformation * | outInfo | ||
) | [protected, virtual] |
This is a convenience method that is implemented in many subclasses instead of RequestData. It is called by RequestData.
Reimplemented from vtkImageReader.
vtkMultiProcessController* vtkMPIImageReader::Controller [protected] |
Definition at line 74 of file vtkMPIImageReader.h.
A group of processes that are reading the same file (as determined by PartitionController.
Definition at line 110 of file vtkMPIImageReader.h.