VTK
9.1.0
IO
OMF
core
OMFFile.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: OMFFile.h
5
Language: C++
6
7
Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
8
All rights reserved.
9
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
10
11
This software is distributed WITHOUT ANY WARRANTY; without even
12
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13
PURPOSE. See the above copyright notice for more information.
14
15
=========================================================================*/
16
#ifndef OMFFile_h
17
#define OMFFile_h
18
19
#include "
vtkSmartPointer.h
"
20
21
#include "vtk_jsoncpp_fwd.h"
22
23
#include <memory>
// for std::unique_ptr
24
#include <string>
25
#include <vector>
26
27
class
vtkDataArray
;
28
class
vtkImageData
;
29
30
namespace
omf
31
{
32
33
struct
OMFFile
34
{
35
OMFFile
();
36
~OMFFile
();
37
38
bool
OpenStream
(
const
char
* filename);
39
40
std::string
GetFileName
();
41
42
bool
ReadHeader
(
std::string
& uid);
43
44
bool
ParseJSON
();
45
46
const
Json::Value&
JSONRoot
();
47
48
vtkSmartPointer<vtkDataArray>
ReadArrayFromStream
(
const
std::string
& uid,
int
numComponents = -1);
49
50
vtkSmartPointer<vtkImageData>
ReadPNGFromStream
(
const
Json::Value& json);
51
52
std::vector<std::string>
ReadStringArrayFromStream
(
const
std::string
& uid);
53
54
private
:
55
struct
FileImpl;
56
std::unique_ptr<FileImpl> Impl;
57
};
58
59
}
// end namespace omf
60
#endif
omf::OMFFile::ReadHeader
bool ReadHeader(std::string &uid)
omf::OMFFile::JSONRoot
const Json::Value & JSONRoot()
omf
Definition:
OMFElement.h:31
omf::OMFFile::OpenStream
bool OpenStream(const char *filename)
omf::OMFFile::~OMFFile
~OMFFile()
vtkSmartPointer< vtkDataArray >
vtkDataArray
abstract superclass for arrays of numeric data
Definition:
vtkDataArray.h:159
omf::OMFFile::ReadStringArrayFromStream
std::vector< std::string > ReadStringArrayFromStream(const std::string &uid)
vtkImageData
topologically and geometrically regular array of data
Definition:
vtkImageData.h:157
vtkSmartPointer.h
vtkX3D::string
@ string
Definition:
vtkX3D.h:496
omf::OMFFile::ReadArrayFromStream
vtkSmartPointer< vtkDataArray > ReadArrayFromStream(const std::string &uid, int numComponents=-1)
omf::OMFFile::GetFileName
std::string GetFileName()
omf::OMFFile::ParseJSON
bool ParseJSON()
omf::OMFFile
Definition:
OMFFile.h:34
omf::OMFFile::ReadPNGFromStream
vtkSmartPointer< vtkImageData > ReadPNGFromStream(const Json::Value &json)
omf::OMFFile::OMFFile
OMFFile()
Generated on Fri Nov 5 2021 00:11:14 for VTK by
1.8.20