Viskores  1.0
Public Member Functions | Protected Member Functions | Private Types | List of all members
viskores::io::ImageReaderPNG Class Reference

Reads images using the PNG format. More...

#include <ImageReaderPNG.h>

Inheritance diagram for viskores::io::ImageReaderPNG:
viskores::io::ImageReaderBase

Public Member Functions

 ~ImageReaderPNG () noexcept override
 
 ImageReaderPNG (const ImageReaderPNG &)=delete
 
ImageReaderPNGoperator= (const ImageReaderPNG &)=delete
 
- Public Member Functions inherited from viskores::io::ImageReaderBase
 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
 
ImageReaderBaseoperator= (const ImageReaderBase &)=delete
 
const viskores::cont::DataSetReadDataSet ()
 Load data from the file and return it in a DataSet object. More...
 
const viskores::cont::DataSetGetDataSet () 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

void Read () override
 
- Protected Member Functions inherited from viskores::io::ImageReaderBase
void InitializeImageDataSet (const viskores::Id &width, const viskores::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 viskores::io::ImageReaderBase
using ColorArrayType = viskores::cont::ArrayHandle< viskores::Vec4f_32 >
 
- Protected Attributes inherited from viskores::io::ImageReaderBase
std::string FileName
 
std::string PointFieldName = "color"
 
viskores::cont::DataSet DataSet
 

Detailed Description

Reads images using the PNG format.

ImageReaderPNG is constructed with the name of the file to read. The data from the file is read by calling the ReadDataSet method.

ImageReaderPNG will automatically upsample/downsample read image data to a 16 bit RGB no matter how the image is compressed. It is up to the user to decide the pixel format for input PNGs

By default, the colors are stored in a field named "colors", but the name of the field can optionally be changed using the SetPointFieldName method.

Member Typedef Documentation

◆ Superclass

Constructor & Destructor Documentation

◆ ~ImageReaderPNG()

viskores::io::ImageReaderPNG::~ImageReaderPNG ( )
overridenoexcept

◆ ImageReaderPNG()

viskores::io::ImageReaderPNG::ImageReaderPNG ( const ImageReaderPNG )
delete

Member Function Documentation

◆ operator=()

ImageReaderPNG& viskores::io::ImageReaderPNG::operator= ( const ImageReaderPNG )
delete

◆ Read()

void viskores::io::ImageReaderPNG::Read ( )
overrideprotectedvirtual

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