Go to the documentation of this file.
37 #ifndef vtkCSVExporter_h
38 #define vtkCSVExporter_h
41 #include "vtkPVVTKExtensionsFiltersRenderingModule.h"
60 vtkSetStringMacro(FileName);
61 vtkGetStringMacro(FileName);
68 vtkSetStringMacro(FieldDelimiter);
69 vtkGetStringMacro(FieldDelimiter);
79 vtkSetMacro(Formatting,
int);
80 vtkGetMacro(Formatting,
int);
90 vtkSetMacro(Precision,
int);
91 vtkGetMacro(Precision,
int);
99 void SetColumnLabel(
const char* name,
const char* label);
100 void ClearColumnLabels();
101 const char* GetColumnLabel(
const char* name);
107 bool Open(ExporterModes mode = STREAM_ROWS)
override;
113 void Close()
override;
119 void Abort()
override;
142 void AddStyle(
vtkPlot* vtkNotUsed(plot),
const char* vtkNotUsed(plotName))
override{};
151 vtkSetMacro(WriteToOutputString,
bool);
152 vtkGetMacro(WriteToOutputString,
bool);
153 vtkBooleanMacro(WriteToOutputString,
bool);
161 std::string GetOutputString();
167 char* FileName =
nullptr;
168 char* FieldDelimiter =
nullptr;
169 std::ostream* OutputStream =
nullptr;
172 bool WriteToOutputString =
false;
183 vtkInternals* Internals;
virtual void Abort()=0
Same as Close except deletes the file, if created.
virtual void WriteHeader(vtkFieldData *)=0
In STREAM_ROWS mode, use these methods to write column headers once using WriteHeader and then use Wr...
exporter used by certain views to export data as CSV.
exporter used by certain views to export data into a file or stream.
virtual void Close()=0
Closes the file cleanly.
void AddStyle(vtkPlot *vtkNotUsed(plot), const char *vtkNotUsed(plotName)) override
void PrintSelf(ostream &os, vtkIndent indent) override
virtual void AddColumn(vtkAbstractArray *yarray, const char *yarrayname=nullptr, vtkDataArray *xarray=nullptr)=0
In STREAM_COLUMNS mode, use this method to add a column (yarray).
void SetGlobalStyle(vtkChart *vtkNotUsed(chart)) override
static vtkAbstractChartExporter * New()
virtual bool Open(ExporterModes mode=STREAM_ROWS)=0
Open the file and set mode in which the exporter is operating.
virtual void WriteData(vtkFieldData *)=0
In STREAM_ROWS mode, use these methods to write column headers once using WriteHeader and then use Wr...