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

Serialize vtkArrayData to a file or stream. More...

#include <vtkArrayDataWriter.h>

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

List of all members.

Public Types

typedef vtkWriter Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkArrayDataWriterNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
virtual int Write ()
bool Write (const vtkStdString &FileName, bool WriteBinary=false)
bool Write (ostream &stream, bool WriteBinary=false)
vtkStdString Write (bool WriteBinary)
virtual void SetFileName (const char *)
virtual char * GetFileName ()
virtual void SetBinary (int)
virtual int GetBinary ()
virtual void BinaryOn ()
virtual void BinaryOff ()
virtual vtkStdString GetOutputString ()
virtual void SetWriteToOutputString (bool)
virtual bool GetWriteToOutputString ()
virtual void WriteToOutputStringOn ()
virtual void WriteToOutputStringOff ()

Static Public Member Functions

static vtkArrayDataWriterNew ()
static int IsTypeOf (const char *type)
static vtkArrayDataWriterSafeDownCast (vtkObjectBase *o)
static bool Write (vtkArrayData *array, const vtkStdString &file_name, bool WriteBinary=false)
static vtkStdString Write (vtkArrayData *array, bool WriteBinary=false)
static bool Write (vtkArrayData *array, ostream &stream, bool WriteBinary=false)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkArrayDataWriter ()
 ~vtkArrayDataWriter ()
virtual int FillInputPortInformation (int port, vtkInformation *info)
virtual void WriteData ()

Protected Attributes

char * FileName
int Binary
bool WriteToOutputString
vtkStdString OutputString

Detailed Description

Serialize vtkArrayData to a file or stream.

vtkArrayDataWriter serializes vtkArrayData using a text-based format that is human-readable and easily parsed (default option). The WriteBinary array option can be used to serialize the vtkArrayData using a binary format that is optimized for rapid throughput.

vtkArrayDataWriter can be used in two distinct ways: first, it can be used as a normal pipeline filter, which writes its inputs to a file. Alternatively, static methods are provided for writing vtkArrayData instances to files or arbitrary c++ streams.

Inputs: Input port 0: (required) vtkArrayData object.

Output Format: See http://www.kitware.com/InfovisWiki/index.php/N-Way_Array_File_Formats for details on how vtkArrayDataWriter encodes data.

See also:
vtkArrayDataReader
Thanks:
Developed by Timothy M. Shead (tshea.nosp@m.d@sa.nosp@m.ndia..nosp@m.gov) at Sandia National Laboratories.
Tests:
vtkArrayDataWriter (Tests)

Definition at line 62 of file vtkArrayDataWriter.h.


Member Typedef Documentation

Reimplemented from vtkWriter.

Definition at line 67 of file vtkArrayDataWriter.h.


Constructor & Destructor Documentation


Member Function Documentation

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

Reimplemented from vtkAlgorithm.

static int vtkArrayDataWriter::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 vtkWriter.

virtual int vtkArrayDataWriter::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 vtkWriter.

Reimplemented from vtkWriter.

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

Reimplemented from vtkWriter.

Reimplemented from vtkWriter.

void vtkArrayDataWriter::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 vtkWriter.

virtual void vtkArrayDataWriter::SetFileName ( const char *  ) [virtual]

Get / set the filename where data will be stored (when used as a filter).

virtual char* vtkArrayDataWriter::GetFileName ( ) [virtual]

Get / set the filename where data will be stored (when used as a filter).

virtual void vtkArrayDataWriter::SetBinary ( int  ) [virtual]

Get / set whether data will be written in binary format (when used as a filter).

virtual int vtkArrayDataWriter::GetBinary ( ) [virtual]

Get / set whether data will be written in binary format (when used as a filter).

virtual void vtkArrayDataWriter::BinaryOn ( ) [virtual]

Get / set whether data will be written in binary format (when used as a filter).

virtual void vtkArrayDataWriter::BinaryOff ( ) [virtual]

Get / set whether data will be written in binary format (when used as a filter).

virtual vtkStdString vtkArrayDataWriter::GetOutputString ( ) [inline, virtual]

The output string. This is only set when WriteToOutputString is set.

Definition at line 87 of file vtkArrayDataWriter.h.

virtual void vtkArrayDataWriter::SetWriteToOutputString ( bool  ) [virtual]

Whether to output to a string instead of to a file, which is the default.

virtual bool vtkArrayDataWriter::GetWriteToOutputString ( ) [virtual]

Whether to output to a string instead of to a file, which is the default.

virtual void vtkArrayDataWriter::WriteToOutputStringOn ( ) [virtual]

Whether to output to a string instead of to a file, which is the default.

virtual void vtkArrayDataWriter::WriteToOutputStringOff ( ) [virtual]

Whether to output to a string instead of to a file, which is the default.

virtual int vtkArrayDataWriter::Write ( ) [virtual]

Write data to output. Method executes subclasses WriteData() method, as well as StartMethod() and EndMethod() methods. Returns 1 on success and 0 on failure.

Reimplemented from vtkWriter.

bool vtkArrayDataWriter::Write ( const vtkStdString FileName,
bool  WriteBinary = false 
)

Writes input port 0 data to a file, using an arbitrary filename and binary flag.

static bool vtkArrayDataWriter::Write ( vtkArrayData array,
const vtkStdString file_name,
bool  WriteBinary = false 
) [static]

Write an arbitrary array to a file, without using the pipeline.

bool vtkArrayDataWriter::Write ( ostream &  stream,
bool  WriteBinary = false 
)

Write input port 0 data to an arbitrary stream. Note: streams should always be opened in binary mode, to prevent problems reading files on Windows.

static bool vtkArrayDataWriter::Write ( vtkArrayData array,
ostream &  stream,
bool  WriteBinary = false 
) [static]

Write arbitrary data to a stream without using the pipeline. Note: streams should always be opened in binary mode, to prevent problems reading files on Windows.

vtkStdString vtkArrayDataWriter::Write ( bool  WriteBinary)

Write input port 0 data to a string. Note that the WriteBinary argument is not optional in order to not clash with the inherited Write() method.

static vtkStdString vtkArrayDataWriter::Write ( vtkArrayData array,
bool  WriteBinary = false 
) [static]

Write arbitrary data to a string without using the pipeline.

virtual int vtkArrayDataWriter::FillInputPortInformation ( int  port,
vtkInformation info 
) [protected, virtual]

Fill the input port information objects for this algorithm. This is invoked by the first call to GetInputPortInformation for each port so subclasses can specify what they can handle.

Reimplemented from vtkAlgorithm.

virtual void vtkArrayDataWriter::WriteData ( ) [protected, virtual]

Implements vtkWriter.


Member Data Documentation

char* vtkArrayDataWriter::FileName [protected]

Definition at line 137 of file vtkArrayDataWriter.h.

Definition at line 138 of file vtkArrayDataWriter.h.

Definition at line 139 of file vtkArrayDataWriter.h.

Definition at line 140 of file vtkArrayDataWriter.h.


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