VTK
|
Serialize sparse and dense arrays to a file or stream. More...
#include <vtkArrayWriter.h>
Public Types | |
typedef vtkWriter | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkArrayWriter * | NewInstance () 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 vtkArrayWriter * | New () |
static int | IsTypeOf (const char *type) |
static vtkArrayWriter * | SafeDownCast (vtkObjectBase *o) |
static bool | Write (vtkArray *array, const vtkStdString &file_name, bool WriteBinary=false) |
static vtkStdString | Write (vtkArray *array, bool WriteBinary=false) |
static bool | Write (vtkArray *array, ostream &stream, bool WriteBinary=false) |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkArrayWriter () | |
~vtkArrayWriter () | |
virtual int | FillInputPortInformation (int port, vtkInformation *info) |
virtual void | WriteData () |
Protected Attributes | |
char * | FileName |
int | Binary |
bool | WriteToOutputString |
vtkStdString | OutputString |
Serialize sparse and dense arrays to a file or stream.
vtkArrayWriter serializes sparse and dense array data using a text-based format that is human-readable and easily parsed (default option). The WriteBinary array option can be used to serialize the sparse and dense array data using a binary format that is optimized for rapid throughput.
vtkArrayWriter 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 vtkArray instances to files or arbitrary c++ streams.
Inputs: Input port 0: (required) vtkArrayData object containing a single sparse or dense array.
Output Format: See http://www.kitware.com/InfovisWiki/index.php/N-Way_Array_File_Formats for details on how vtkArrayWriter encodes data.
Definition at line 63 of file vtkArrayWriter.h.
typedef vtkWriter vtkArrayWriter::Superclass |
Reimplemented from vtkWriter.
Definition at line 68 of file vtkArrayWriter.h.
vtkArrayWriter::vtkArrayWriter | ( | ) | [protected] |
vtkArrayWriter::~vtkArrayWriter | ( | ) | [protected] |
static vtkArrayWriter* vtkArrayWriter::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkAlgorithm.
static int vtkArrayWriter::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 vtkArrayWriter::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.
static vtkArrayWriter* vtkArrayWriter::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkWriter.
virtual vtkObjectBase* vtkArrayWriter::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkWriter.
vtkArrayWriter* vtkArrayWriter::NewInstance | ( | ) | const |
Reimplemented from vtkWriter.
void vtkArrayWriter::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
virtual void vtkArrayWriter::SetFileName | ( | const char * | ) | [virtual] |
Get / set the filename where data will be stored (when used as a filter).
virtual char* vtkArrayWriter::GetFileName | ( | ) | [virtual] |
Get / set the filename where data will be stored (when used as a filter).
virtual void vtkArrayWriter::SetBinary | ( | int | ) | [virtual] |
Get / set whether data will be written in binary format (when used as a filter).
virtual int vtkArrayWriter::GetBinary | ( | ) | [virtual] |
Get / set whether data will be written in binary format (when used as a filter).
virtual void vtkArrayWriter::BinaryOn | ( | ) | [virtual] |
Get / set whether data will be written in binary format (when used as a filter).
virtual void vtkArrayWriter::BinaryOff | ( | ) | [virtual] |
Get / set whether data will be written in binary format (when used as a filter).
virtual vtkStdString vtkArrayWriter::GetOutputString | ( | ) | [inline, virtual] |
The output string. This is only set when WriteToOutputString is set.
Definition at line 88 of file vtkArrayWriter.h.
virtual void vtkArrayWriter::SetWriteToOutputString | ( | bool | ) | [virtual] |
Whether to output to a string instead of to a file, which is the default.
virtual bool vtkArrayWriter::GetWriteToOutputString | ( | ) | [virtual] |
Whether to output to a string instead of to a file, which is the default.
virtual void vtkArrayWriter::WriteToOutputStringOn | ( | ) | [virtual] |
Whether to output to a string instead of to a file, which is the default.
virtual void vtkArrayWriter::WriteToOutputStringOff | ( | ) | [virtual] |
Whether to output to a string instead of to a file, which is the default.
virtual int vtkArrayWriter::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 vtkArrayWriter::Write | ( | const vtkStdString & | FileName, |
bool | WriteBinary = false |
||
) |
Writes input port 0 data to a file, using an arbitrary filename and binary flag.
static bool vtkArrayWriter::Write | ( | vtkArray * | array, |
const vtkStdString & | file_name, | ||
bool | WriteBinary = false |
||
) | [static] |
Write an arbitrary array to a file, without using the pipeline.
bool vtkArrayWriter::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 vtkArrayWriter::Write | ( | vtkArray * | 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 vtkArrayWriter::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 vtkArrayWriter::Write | ( | vtkArray * | array, |
bool | WriteBinary = false |
||
) | [static] |
Write arbitrary data to a string without using the pipeline.
virtual int vtkArrayWriter::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 vtkArrayWriter::WriteData | ( | ) | [protected, virtual] |
Implements vtkWriter.
char* vtkArrayWriter::FileName [protected] |
Definition at line 138 of file vtkArrayWriter.h.
int vtkArrayWriter::Binary [protected] |
Definition at line 139 of file vtkArrayWriter.h.
bool vtkArrayWriter::WriteToOutputString [protected] |
Definition at line 140 of file vtkArrayWriter.h.
vtkStdString vtkArrayWriter::OutputString [protected] |
Definition at line 141 of file vtkArrayWriter.h.