VTK-m  2.0
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkm::io::ImageReaderBase Class Referenceabstract

Manages reading, and loading data from images. More...

#include <ImageReaderBase.h>

Inheritance diagram for vtkm::io::ImageReaderBase:
vtkm::io::ImageReaderHDF5 vtkm::io::ImageReaderPNG vtkm::io::ImageReaderPNM

Public Types

using ColorArrayType = vtkm::cont::ArrayHandle< vtkm::Vec4f_32 >
 

Public Member Functions

VTKM_CONT ImageReaderBase (const char *filename)
 
VTKM_CONT ImageReaderBase (const std::string &filename)
 
virtual VTKM_CONT ~ImageReaderBase () noexcept
 
 ImageReaderBase (const ImageReaderBase &)=delete
 
ImageReaderBaseoperator= (const ImageReaderBase &)=delete
 
const VTKM_CONT vtkm::cont::DataSetReadDataSet ()
 
const VTKM_CONT vtkm::cont::DataSetGetDataSet () const
 
const VTKM_CONT std::string & GetPointFieldName () const
 
VTKM_CONT void SetPointFieldName (const std::string &name)
 
const VTKM_CONT std::string & GetFileName () const
 
VTKM_CONT void SetFileName (const std::string &filename)
 

Protected Member Functions

virtual VTKM_CONT 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
 

Detailed Description

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.

Member Typedef Documentation

◆ ColorArrayType

Constructor & Destructor Documentation

◆ ImageReaderBase() [1/3]

VTKM_CONT vtkm::io::ImageReaderBase::ImageReaderBase ( const char *  filename)
explicit

◆ ImageReaderBase() [2/3]

VTKM_CONT vtkm::io::ImageReaderBase::ImageReaderBase ( const std::string &  filename)
explicit

◆ ~ImageReaderBase()

virtual VTKM_CONT vtkm::io::ImageReaderBase::~ImageReaderBase ( )
virtualnoexcept

◆ ImageReaderBase() [3/3]

vtkm::io::ImageReaderBase::ImageReaderBase ( const ImageReaderBase )
delete

Member Function Documentation

◆ GetDataSet()

const VTKM_CONT vtkm::cont::DataSet& vtkm::io::ImageReaderBase::GetDataSet ( ) const
inline

◆ GetFileName()

const VTKM_CONT std::string& vtkm::io::ImageReaderBase::GetFileName ( ) const
inline

◆ GetPointFieldName()

const VTKM_CONT std::string& vtkm::io::ImageReaderBase::GetPointFieldName ( ) const
inline

◆ InitializeImageDataSet()

void vtkm::io::ImageReaderBase::InitializeImageDataSet ( const vtkm::Id width,
const vtkm::Id height,
const ColorArrayType pixels 
)
protected

Resets the DataSet to hold the given pixels.

◆ operator=()

ImageReaderBase& vtkm::io::ImageReaderBase::operator= ( const ImageReaderBase )
delete

◆ Read()

virtual VTKM_CONT void vtkm::io::ImageReaderBase::Read ( )
protectedpure virtual

◆ ReadDataSet()

const VTKM_CONT vtkm::cont::DataSet& vtkm::io::ImageReaderBase::ReadDataSet ( )

◆ SetFileName()

VTKM_CONT void vtkm::io::ImageReaderBase::SetFileName ( const std::string &  filename)
inline

◆ SetPointFieldName()

VTKM_CONT void vtkm::io::ImageReaderBase::SetPointFieldName ( const std::string &  name)
inline

Member Data Documentation

◆ DataSet

vtkm::cont::DataSet vtkm::io::ImageReaderBase::DataSet
protected

◆ FileName

std::string vtkm::io::ImageReaderBase::FileName
protected

◆ PointFieldName

std::string vtkm::io::ImageReaderBase::PointFieldName = "color"
protected

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