collects data for a vtk <DataArray> and writes it in ascii or raw binary appended format
More...
#include <DataArray.h>
|
| | DataArray (std::string name, int numComponents, std::vector< TDataType > &&data) |
| |
| std::string | VtkTypeString () const |
| |
| int | Offset () const |
| |
| void | WriteCommonHeader (std::ostream &file) const |
| | writes the header for both ascii and binary format including "name", "NumberOfComponents" and "type" More...
|
| |
| void | WriteAscii (std::ostream &file) const |
| | writes to ascii including the common header, "type" and the actual data More...
|
| |
| void | WriteBinaryHeader (std::ostream &file, int *offset) const |
| | writes the binary header including the common header, "type", "offset" and calculates the new offset More...
|
| |
| void | WriteBinaryData (std::ofstream &file) const |
| | writes the data in uncompressed raw binary More...
|
| |
| template<> |
| std::string | VtkTypeString () const |
| |
| template<> |
| std::string | VtkTypeString () const |
| |
| template<> |
| std::string | VtkTypeString () const |
| |
| template<> |
| std::string | VtkTypeString () const |
| |
template<typename TDataType>
class NuTo::Visualize::DataArray< TDataType >
collects data for a vtk <DataArray> and writes it in ascii or raw binary appended format
template<typename TDataType>
| DataArray::DataArray |
( |
std::string |
name, |
|
|
int |
numComponents, |
|
|
std::vector< TDataType > && |
data |
|
) |
| |
- Parameters
-
| name | "name" attribute |
| numComponents | "NumberOfComponents" attribute |
| data | data as a xvalue. You'll have to std::move() the data in here. |
template<typename TDataType >
| int DataArray::Offset |
( |
| ) |
const |
- Returns
- calculates the byte offset in the raw binary appended format via offset = headerSize (usually 8) + #data * sizeof(data)
template<typename TDataType>
- Returns
- matching vtk type string to <typename tdatatype>="">
template<typename TDataType >
| void DataArray::WriteAscii |
( |
std::ostream & |
file | ) |
const |
writes to ascii including the common header, "type" and the actual data
- Parameters
-
| file | outstream to write into |
template<typename TDataType >
| void DataArray::WriteBinaryData |
( |
std::ofstream & |
file | ) |
const |
writes the data in uncompressed raw binary
- Parameters
-
| file | file to write the raw binary |
template<typename TDataType >
| void DataArray::WriteBinaryHeader |
( |
std::ostream & |
file, |
|
|
int * |
offset |
|
) |
| const |
writes the binary header including the common header, "type", "offset" and calculates the new offset
- Parameters
-
| file | outstream to write into |
| offset | "offset" attribute that gets updated with the current offset |
template<typename TDataType >
| void DataArray::WriteCommonHeader |
( |
std::ostream & |
file | ) |
const |
writes the header for both ascii and binary format including "name", "NumberOfComponents" and "type"
- Parameters
-
| file | outstream to write into |
The documentation for this class was generated from the following files: