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

Read nrrd files efficiently from parallel file systems (and reasonably well elsewhere). More...

#include <vtkPNrrdReader.h>

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

List of all members.

Public Types

typedef vtkNrrdReader Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkPNrrdReaderNewInstance () 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 vtkPNrrdReaderSafeDownCast (vtkObjectBase *o)
static vtkPNrrdReaderNew ()

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkPNrrdReader ()
 ~vtkPNrrdReader ()
virtual int ReadHeader ()
virtual int ReadHeader (vtkCharArray *headerBuffer)
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

Read nrrd files efficiently from parallel file systems (and reasonably well elsewhere).

vtkPNrrdReader is a subclass of vtkNrrdReader that will read Nrrd format header information of the image before reading the data. This means that the reader will automatically set information like file dimensions.

Bug:
There are several limitations on what type of nrrd files we can read. This reader only supports nrrd files in raw format. Other encodings like ascii and hex will result in errors. When reading in detached headers, this only supports reading one file that is detached.
@par      Tests:
          @ref c2_vtk_t_vtkPNrrdReader "vtkPNrrdReader (Tests)"

Definition at line 52 of file vtkPNrrdReader.h.


Member Typedef Documentation

Reimplemented from vtkNrrdReader.

Definition at line 55 of file vtkPNrrdReader.h.


Constructor & Destructor Documentation


Member Function Documentation

static int vtkPNrrdReader::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 vtkNrrdReader.

virtual int vtkPNrrdReader::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 vtkNrrdReader.

Reimplemented from vtkNrrdReader.

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

Reimplemented from vtkNrrdReader.

Reimplemented from vtkNrrdReader.

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

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

Reimplemented from vtkNrrdReader.

virtual void vtkPNrrdReader::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 vtkNrrdReader.

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.

virtual int vtkPNrrdReader::ReadHeader ( ) [protected, virtual]

Reimplemented from vtkNrrdReader.

virtual int vtkPNrrdReader::ReadHeader ( vtkCharArray headerBuffer) [protected, virtual]

Reimplemented from vtkNrrdReader.

Returns the size, in bytes of the scalar data type (GetDataScalarType).

virtual void vtkPNrrdReader::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 vtkPNrrdReader::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 vtkPNrrdReader::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 vtkPNrrdReader::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 vtkPNrrdReader::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 vtkPNrrdReader::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

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

Definition at line 107 of file vtkPNrrdReader.h.

Definition at line 113 of file vtkPNrrdReader.h.


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