Volume Cartographer 2.27.0
Classes | List of all members
volcart::PointSetIO< T > Class Template Reference
Core » IO

Read and write PointSet and OrderedPointSet. More...

#include <vc/core/io/PointSetIO.hpp>

Classes

struct  Header
 PointSet file header information. More...
 

Static Public Member Functions

static OrderedPointSet< T > ReadOrderedPointSet (const volcart::filesystem::path &path, IOMode mode=IOMode::BINARY)
 Read OrderedPointSet from file. More...
 
static PointSet< T > ReadPointSet (const volcart::filesystem::path &path, IOMode mode=IOMode::BINARY)
 Read PointSet from file. More...
 
static void WriteOrderedPointSet (const volcart::filesystem::path &path, const OrderedPointSet< T > &ps, IOMode mode=IOMode::BINARY)
 Write an OrderedPointSet to disk. More...
 
static void WritePointSet (const volcart::filesystem::path &path, const PointSet< T > &ps, IOMode mode=IOMode::BINARY)
 Write a PointSet to disk. More...
 
static std::string MakeHeader (PointSet< T > ps)
 Generate a PointSet header string. More...
 
static std::string MakeOrderedHeader (OrderedPointSet< T > ps)
 Generate an OrderedPointSet header string. More...
 
static Header ParseHeader (std::ifstream &infile, bool ordered=true)
 Parse a PointSet/OrderedPointSet file header. More...
 

Static Private Member Functions

static PointSet< T > ReadPointSetAscii (const volcart::filesystem::path &path)
 Read an ASCII PointSet. More...
 
static OrderedPointSet< T > ReadOrderedPointSetAscii (const volcart::filesystem::path &path)
 Read an ASCII OrderedPointSet. More...
 
static PointSet< T > ReadPointSetBinary (const volcart::filesystem::path &path)
 Read a binary PointSet. More...
 
static OrderedPointSet< T > ReadOrderedPointSetBinary (const volcart::filesystem::path &path)
 Read a binary OrderedPointSet. More...
 
static void WritePointSetAscii (const volcart::filesystem::path &path, PointSet< T > ps)
 Write an ASCII PointSet. More...
 
static void WritePointSetBinary (const volcart::filesystem::path &path, PointSet< T > ps)
 Write a binary PointSet. More...
 
static void WriteOrderedPointSetAscii (const volcart::filesystem::path &path, OrderedPointSet< T > ps)
 Write an ASCII OrderedPointSet. More...
 
static void WriteOrderedPointSetBinary (const volcart::filesystem::path &path, OrderedPointSet< T > ps)
 Write a binary OrderedPointSet. More...
 

Detailed Description

template<typename T>
class volcart::PointSetIO< T >

Read and write PointSet and OrderedPointSet.

Author
Sean Karlage

PointSet and OrderedPointSet files always begin with an ASCII header. Point information is then encoded in either ASCII or binary, as determined at time of write.

See also
volcart::PointSet
volcart::OrderedPointSet

Definition at line 44 of file PointSetIO.hpp.

Member Function Documentation

◆ MakeHeader()

template<typename T >
static std::string volcart::PointSetIO< T >::MakeHeader ( PointSet< T >  ps)
inlinestatic

Generate a PointSet header string.

Definition at line 128 of file PointSetIO.hpp.

◆ MakeOrderedHeader()

template<typename T >
static std::string volcart::PointSetIO< T >::MakeOrderedHeader ( OrderedPointSet< T >  ps)
inlinestatic

Generate an OrderedPointSet header string.

Definition at line 154 of file PointSetIO.hpp.

◆ ParseHeader()

template<typename T >
static Header volcart::PointSetIO< T >::ParseHeader ( std::ifstream &  infile,
bool  ordered = true 
)
inlinestatic

Parse a PointSet/OrderedPointSet file header.

The input file stream should be open and pointing at the beginning of the file. Will throw an exception if the ordered parameter does not match the ordereing type of the file.

Definition at line 188 of file PointSetIO.hpp.

◆ ReadOrderedPointSet()

template<typename T >
static OrderedPointSet< T > volcart::PointSetIO< T >::ReadOrderedPointSet ( const volcart::filesystem::path &  path,
IOMode  mode = IOMode::BINARY 
)
inlinestatic

Read OrderedPointSet from file.

The IOMode should match the encoding type of the file. Point information is expected to be stored in the type and order specified by the template parameter T.

Definition at line 65 of file PointSetIO.hpp.

◆ ReadOrderedPointSetAscii()

template<typename T >
static OrderedPointSet< T > volcart::PointSetIO< T >::ReadOrderedPointSetAscii ( const volcart::filesystem::path &  path)
inlinestaticprivate

Read an ASCII OrderedPointSet.

Definition at line 366 of file PointSetIO.hpp.

◆ ReadOrderedPointSetBinary()

template<typename T >
static OrderedPointSet< T > volcart::PointSetIO< T >::ReadOrderedPointSetBinary ( const volcart::filesystem::path &  path)
inlinestaticprivate

Read a binary OrderedPointSet.

Definition at line 429 of file PointSetIO.hpp.

◆ ReadPointSet()

template<typename T >
static PointSet< T > volcart::PointSetIO< T >::ReadPointSet ( const volcart::filesystem::path &  path,
IOMode  mode = IOMode::BINARY 
)
inlinestatic

Read PointSet from file.

The IOMode should match the encoding type of the file. Point information is expected to be stored in the type and order specified by the template parameter T.

Definition at line 82 of file PointSetIO.hpp.

◆ ReadPointSetAscii()

template<typename T >
static PointSet< T > volcart::PointSetIO< T >::ReadPointSetAscii ( const volcart::filesystem::path &  path)
inlinestaticprivate

Read an ASCII PointSet.

Definition at line 342 of file PointSetIO.hpp.

◆ ReadPointSetBinary()

template<typename T >
static PointSet< T > volcart::PointSetIO< T >::ReadPointSetBinary ( const volcart::filesystem::path &  path)
inlinestaticprivate

Read a binary PointSet.

Definition at line 397 of file PointSetIO.hpp.

◆ WriteOrderedPointSet()

template<typename T >
static void volcart::PointSetIO< T >::WriteOrderedPointSet ( const volcart::filesystem::path &  path,
const OrderedPointSet< T > &  ps,
IOMode  mode = IOMode::BINARY 
)
inlinestatic

Write an OrderedPointSet to disk.

Definition at line 98 of file PointSetIO.hpp.

◆ WriteOrderedPointSetAscii()

template<typename T >
static void volcart::PointSetIO< T >::WriteOrderedPointSetAscii ( const volcart::filesystem::path &  path,
OrderedPointSet< T >  ps 
)
inlinestaticprivate

Write an ASCII OrderedPointSet.

Definition at line 522 of file PointSetIO.hpp.

◆ WriteOrderedPointSetBinary()

template<typename T >
static void volcart::PointSetIO< T >::WriteOrderedPointSetBinary ( const volcart::filesystem::path &  path,
OrderedPointSet< T >  ps 
)
inlinestaticprivate

Write a binary OrderedPointSet.

Definition at line 549 of file PointSetIO.hpp.

◆ WritePointSet()

template<typename T >
static void volcart::PointSetIO< T >::WritePointSet ( const volcart::filesystem::path &  path,
const PointSet< T > &  ps,
IOMode  mode = IOMode::BINARY 
)
inlinestatic

Write a PointSet to disk.

Definition at line 112 of file PointSetIO.hpp.

◆ WritePointSetAscii()

template<typename T >
static void volcart::PointSetIO< T >::WritePointSetAscii ( const volcart::filesystem::path &  path,
PointSet< T >  ps 
)
inlinestaticprivate

Write an ASCII PointSet.

Definition at line 469 of file PointSetIO.hpp.

◆ WritePointSetBinary()

template<typename T >
static void volcart::PointSetIO< T >::WritePointSetBinary ( const volcart::filesystem::path &  path,
PointSet< T >  ps 
)
inlinestaticprivate

Write a binary PointSet.

Definition at line 496 of file PointSetIO.hpp.


The documentation for this class was generated from the following file: