VTK-m
2.2
|
Manages reading, and loading data from images. More...
#include <ImageReaderBase.h>
Public Types | |
using | ColorArrayType = vtkm::cont::ArrayHandle< vtkm::Vec4f_32 > |
Public Member Functions | |
ImageReaderBase (const char *filename) | |
ImageReaderBase (const std::string &filename) | |
Construct a reader to load data from the given file. More... | |
virtual | ~ImageReaderBase () noexcept |
ImageReaderBase (const ImageReaderBase &)=delete | |
ImageReaderBase & | operator= (const ImageReaderBase &)=delete |
const vtkm::cont::DataSet & | ReadDataSet () |
Load data from the file and return it in a DataSet object. More... | |
const vtkm::cont::DataSet & | GetDataSet () const |
const std::string & | GetPointFieldName () const |
Get the name of the output field that will be created to hold color data. More... | |
void | SetPointFieldName (const std::string &name) |
Set the name of the output field that will be created to hold color data. More... | |
const std::string & | GetFileName () const |
void | SetFileName (const std::string &filename) |
Protected Member Functions | |
virtual void | Read ()=0 |
void | InitializeImageDataSet (const vtkm::Id &width, const vtkm::Id &height, const ColorArrayType &pixels) |
Resets the DataSet to hold the given pixels. More... | |
Protected Attributes | |
std::string | FileName |
std::string | PointFieldName = "color" |
vtkm::cont::DataSet | DataSet |
Manages reading, and loading data from images.
ImageReaderBase
implements methods for loading imaging data from a canvas or ArrayHandle and storing that data in a vtkm::cont::DataSet. Image RGB values are represented as a point field in a 2D uniform dataset.
ImageReaderBase
implements virtual methods for reading files. Ideally, these methods will be overriden in various subclasses to implement specific functionality for reading data to specific image file-types.
|
explicit |
|
explicit |
Construct a reader to load data from the given file.
|
virtualnoexcept |
|
delete |
|
inline |
|
inline |
|
inline |
Get the name of the output field that will be created to hold color data.
|
protected |
Resets the DataSet
to hold the given pixels.
|
delete |
|
protectedpure virtual |
Implemented in vtkm::io::ImageReaderPNM, vtkm::io::ImageReaderPNG, and vtkm::io::ImageReaderHDF5.
const vtkm::cont::DataSet& vtkm::io::ImageReaderBase::ReadDataSet | ( | ) |
Load data from the file and return it in a DataSet
object.
|
inline |
|
inline |
Set the name of the output field that will be created to hold color data.
|
protected |
|
protected |
|
protected |