VTK
vtkGeoJSONWriter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkGeoJSONWriter.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
26#ifndef vtkGeoJSONWriter_h
27#define vtkGeoJSONWriter_h
28
29#include "vtkIOGeoJSONModule.h" // For export macro
30#include "vtkWriter.h"
31
32class vtkLookupTable;
33
34class VTKIOGEOJSON_EXPORT vtkGeoJSONWriter : public vtkWriter
35{
36public:
38 virtual void PrintSelf( ostream& os, vtkIndent indent );
40
42
45 vtkSetStringMacro(FileName);
48
50
53 vtkSetMacro(WriteToOutputString,bool);
54 vtkGetMacro(WriteToOutputString,bool);
55 vtkBooleanMacro(WriteToOutputString,bool);
57
59
64 vtkGetMacro(OutputStringLength, int);
65 vtkGetStringMacro(OutputString);
66 unsigned char *GetBinaryOutputString()
67 {
68 return reinterpret_cast<unsigned char *>(this->OutputString);
69 }
71
73
79 vtkSetMacro(ScalarFormat,int);
80 vtkGetMacro(ScalarFormat,int);
82
84
88 vtkGetObjectMacro(LookupTable, vtkLookupTable);
90
96
103
104protected:
107
108 // Only accepts vtkPolyData
110
111 // Implementation of Write()
112 void WriteData();
113
114 // Helper for Write that writes attributes out
117
121
123
124 // Internal helpers
125 ostream *OpenFile();
127 void CloseFile(ostream *);
128 class Internals;
129 Internals *WriterHelper;
130 char* FileName;
131
132private:
133 vtkGeoJSONWriter(const vtkGeoJSONWriter&) VTK_DELETE_FUNCTION;
134 void operator=(const vtkGeoJSONWriter&) VTK_DELETE_FUNCTION;
135};
136
137#endif // vtkGeoJSONWriter_h
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
Convert vtkPolyData to Geo JSON format.
void SetLookupTable(vtkLookupTable *lut)
Controls the lookup table to use when ValueMode is set to map colors;.
void CloseFile(ostream *)
Internals * WriterHelper
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
char * RegisterAndGetOutputString()
This convenience method returns the string, sets the IVAR to NULL, so that the user is responsible fo...
unsigned char * GetBinaryOutputString()
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual ~vtkGeoJSONWriter()
void WriteScalar(vtkDataArray *da, vtkIdType ptId)
ostream * OpenFile()
void ConditionalComma(vtkIdType, vtkIdType)
vtkStdString GetOutputStdString()
When WriteToOutputString is on, this method returns a copy of the output string in a vtkStdString.
static vtkGeoJSONWriter * New()
vtkLookupTable * LookupTable
a simple class to control print indentation
Definition: vtkIndent.h:40
Store vtkAlgorithm input/output information.
map scalar values into colors via a lookup table
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:49
abstract class to write data to file(s)
Definition: vtkWriter.h:43
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
int vtkIdType
Definition: vtkType.h:287