VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkMPIImageReader Class Reference

#include <vtkMPIImageReader.h>

Inheritance diagram for vtkMPIImageReader:
Inheritance graph
[legend]
Collaboration diagram for vtkMPIImageReader:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkImageReader Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkMPIImageReaderNewInstance () const
virtual void PrintSelf (ostream &os, vtkIndent indent)
virtual vtkMultiProcessControllerGetController ()
virtual void SetController (vtkMultiProcessController *)

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkMPIImageReaderSafeDownCast (vtkObjectBase *o)
static vtkMPIImageReaderNew ()

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () 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

vtkMultiProcessControllerController
vtkMultiProcessControllerGroupedController
void SetGroupedController (vtkMultiProcessController *)

Detailed Description

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).

See also:
vtkMultiProcessController, vtkImageReader, vtkImageReader2

Definition at line 56 of file vtkMPIImageReader.h.


Member Typedef Documentation

Reimplemented from vtkImageReader.

Definition at line 59 of file vtkMPIImageReader.h.


Constructor & Destructor Documentation


Member Function Documentation

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.

Reimplemented from vtkImageReader.

virtual vtkObjectBase* vtkMPIImageReader::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkImageReader.

Reimplemented from vtkImageReader.

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.

Get/set the multi process controller to use for coordinated reads. By default, set to the global controller.

Get/set the multi process controller to use for coordinated reads. By default, set to the global controller.

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).

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.


Member Data Documentation

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.


The documentation for this class was generated from the following file: