VTK-m
2.0
|
Manages reading images using the PNM format. More...
#include <ImageReaderPNM.h>
Public Member Functions | |
VTKM_CONT | ~ImageReaderPNM () noexcept override |
ImageReaderPNM (const ImageReaderPNM &)=delete | |
ImageReaderPNM & | operator= (const ImageReaderPNM &)=delete |
Public Member Functions inherited from vtkm::io::ImageReaderBase | |
VTKM_CONT | ImageReaderBase (const char *filename) |
VTKM_CONT | ImageReaderBase (const std::string &filename) |
virtual VTKM_CONT | ~ImageReaderBase () noexcept |
ImageReaderBase (const ImageReaderBase &)=delete | |
ImageReaderBase & | operator= (const ImageReaderBase &)=delete |
const VTKM_CONT vtkm::cont::DataSet & | ReadDataSet () |
const VTKM_CONT vtkm::cont::DataSet & | GetDataSet () 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 | |
VTKM_CONT void | Read () override |
template<typename PixelType > | |
void | DecodeFile (std::ifstream &inStream, const vtkm::Id &width, const vtkm::Id &height) |
Reads image data from the provided inStream with the supplied width/height Stores the data in a vector of PixelType which is converted to an DataSet. More... | |
Protected Member Functions inherited from vtkm::io::ImageReaderBase | |
void | InitializeImageDataSet (const vtkm::Id &width, const vtkm::Id &height, const ColorArrayType &pixels) |
Resets the DataSet to hold the given pixels. More... | |
Private Types | |
using | Superclass = ImageReaderBase |
Additional Inherited Members | |
Public Types inherited from vtkm::io::ImageReaderBase | |
using | ColorArrayType = vtkm::cont::ArrayHandle< vtkm::Vec4f_32 > |
Protected Attributes inherited from vtkm::io::ImageReaderBase | |
std::string | FileName |
std::string | PointFieldName = "color" |
vtkm::cont::DataSet | DataSet |
Manages reading images using the PNM format.
ImageReaderPNM
extends ImageReaderBase
, and implements reading images from a valid PNM format (for magic number P6). More details on the PNM format can be found here: http://netpbm.sourceforge.net/doc/ppm.html
When a file is read the parsed MagicNumber and MaxColorSize provided are utilized to correctly parse the bits from the file
|
private |
|
overridenoexcept |
|
delete |
|
protected |
Reads image data from the provided inStream with the supplied width/height Stores the data in a vector of PixelType which is converted to an DataSet.
|
delete |
|
overrideprotectedvirtual |
Implements vtkm::io::ImageReaderBase.