vtkMPIImageReader Class Reference

#include <vtkMPIImageReader.h>

Inheritance diagram for vtkMPIImageReader:

Inheritance graph
[legend]
Collaboration diagram for vtkMPIImageReader:

Collaboration graph
[legend]

List of all members.


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.

Dispite 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 55 of file vtkMPIImageReader.h.

vtkMultiProcessControllerGroupedController
void SetGroupedController (vtkMultiProcessController *)

Public Types

typedef vtkImageReader Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
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 (vtkObject *o)
static vtkMPIImageReaderNew ()

Protected Member Functions

 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 ExecuteData (vtkDataObject *data)

Protected Attributes

vtkMultiProcessControllerController

Member Typedef Documentation

Reimplemented from vtkImageReader.

Reimplemented in vtkPNrrdReader.

Definition at line 58 of file vtkMPIImageReader.h.


Constructor & Destructor Documentation

vtkMPIImageReader::vtkMPIImageReader (  )  [protected]

vtkMPIImageReader::~vtkMPIImageReader (  )  [protected]


Member Function Documentation

virtual const char* vtkMPIImageReader::GetClassName (  )  [virtual]

Reimplemented from vtkImageReader.

Reimplemented in vtkPNrrdReader.

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.

Reimplemented in vtkPNrrdReader.

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 in vtkPNrrdReader.

static vtkMPIImageReader* vtkMPIImageReader::SafeDownCast ( vtkObject o  )  [static]

Reimplemented from vtkImageReader.

Reimplemented in vtkPNrrdReader.

static vtkMPIImageReader* vtkMPIImageReader::New (  )  [static]

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkImageReader.

Reimplemented in vtkPNrrdReader.

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.

Reimplemented in vtkPNrrdReader.

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::ExecuteData ( vtkDataObject output  )  [protected, virtual]

This method is the old style execute method

Reimplemented from vtkImageReader.


Member Data Documentation

Definition at line 73 of file vtkMPIImageReader.h.

A group of processes that are reading the same file (as determined by PartitionController.

Definition at line 109 of file vtkMPIImageReader.h.


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

Generated on Mon Sep 27 18:35:15 2010 for VTK by  doxygen 1.5.6