#include <vtkArrayWriter.h>
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 62 of file vtkArrayWriter.h.
Public Types | |
typedef vtkWriter | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual int | Write () |
bool | Write (const vtkStdString &FileName, bool WriteBinary=false) |
bool | Write (ostream &stream, bool WriteBinary=false) |
virtual void | SetFileName (const char *) |
virtual char * | GetFileName () |
virtual void | SetBinary (int) |
virtual int | GetBinary () |
virtual void | BinaryOn () |
virtual void | BinaryOff () |
Static Public Member Functions | |
static vtkArrayWriter * | New () |
static int | IsTypeOf (const char *type) |
static vtkArrayWriter * | SafeDownCast (vtkObject *o) |
static bool | Write (vtkArray *array, const vtkStdString &file_name, bool WriteBinary=false) |
static bool | Write (vtkArray *array, ostream &stream, bool WriteBinary=false) |
Protected Member Functions | |
vtkArrayWriter () | |
~vtkArrayWriter () | |
virtual int | FillInputPortInformation (int port, vtkInformation *info) |
virtual void | WriteData () |
Protected Attributes | |
char * | FileName |
int | Binary |
typedef vtkWriter vtkArrayWriter::Superclass |
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.
virtual const char* vtkArrayWriter::GetClassName | ( | ) | [virtual] |
Reimplemented from vtkWriter.
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 | ( | vtkObject * | o | ) | [static] |
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 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.
static bool vtkArrayWriter::Write | ( | vtkArray * | array, | |
ostream & | stream, | |||
bool | WriteBinary = false | |||
) | [static] |
Write arbitrary data to a stream 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 111 of file vtkArrayWriter.h.
int vtkArrayWriter::Binary [protected] |
Definition at line 112 of file vtkArrayWriter.h.