VTK-m  2.0
Public Member Functions | Protected Member Functions | Private Types | List of all members
vtkm::io::ImageReaderPNM Class Reference

Manages reading images using the PNM format. More...

#include <ImageReaderPNM.h>

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

Public Member Functions

VTKM_CONT ~ImageReaderPNM () noexcept override
 
 ImageReaderPNM (const ImageReaderPNM &)=delete
 
ImageReaderPNMoperator= (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
 
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

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
 

Detailed Description

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

Member Typedef Documentation

◆ Superclass

Constructor & Destructor Documentation

◆ ~ImageReaderPNM()

VTKM_CONT vtkm::io::ImageReaderPNM::~ImageReaderPNM ( )
overridenoexcept

◆ ImageReaderPNM()

vtkm::io::ImageReaderPNM::ImageReaderPNM ( const ImageReaderPNM )
delete

Member Function Documentation

◆ DecodeFile()

template<typename PixelType >
void vtkm::io::ImageReaderPNM::DecodeFile ( std::ifstream &  inStream,
const vtkm::Id width,
const vtkm::Id height 
)
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.

◆ operator=()

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

◆ Read()

VTKM_CONT void vtkm::io::ImageReaderPNM::Read ( )
overrideprotectedvirtual

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