VTK
|
Serialize vtkArrayData to a file or stream. More...
#include <vtkArrayDataWriter.h>
Public Types | |
typedef vtkWriter | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkArrayDataWriter * | 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 vtkArrayDataWriter * | New () |
static int | IsTypeOf (const char *type) |
static vtkArrayDataWriter * | SafeDownCast (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 vtkObjectBase * | NewInstanceInternal () const |
vtkArrayDataWriter () | |
~vtkArrayDataWriter () | |
virtual int | FillInputPortInformation (int port, vtkInformation *info) |
virtual void | WriteData () |
Protected Attributes | |
char * | FileName |
int | Binary |
bool | WriteToOutputString |
vtkStdString | OutputString |
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.
Definition at line 62 of file vtkArrayDataWriter.h.
Reimplemented from vtkWriter.
Definition at line 67 of file vtkArrayDataWriter.h.
vtkArrayDataWriter::vtkArrayDataWriter | ( | ) | [protected] |
vtkArrayDataWriter::~vtkArrayDataWriter | ( | ) | [protected] |
static vtkArrayDataWriter* vtkArrayDataWriter::New | ( | ) | [static] |
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.
static vtkArrayDataWriter* vtkArrayDataWriter::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkWriter.
virtual vtkObjectBase* vtkArrayDataWriter::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkWriter.
Reimplemented from vtkWriter.
void vtkArrayDataWriter::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
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.
char* vtkArrayDataWriter::FileName [protected] |
Definition at line 137 of file vtkArrayDataWriter.h.
int vtkArrayDataWriter::Binary [protected] |
Definition at line 138 of file vtkArrayDataWriter.h.
bool vtkArrayDataWriter::WriteToOutputString [protected] |
Definition at line 139 of file vtkArrayDataWriter.h.
vtkStdString vtkArrayDataWriter::OutputString [protected] |
Definition at line 140 of file vtkArrayDataWriter.h.