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

Manages writing images using the PNG format via lodepng. More...

#include <ImageWriterPNG.h>

Inheritance diagram for vtkm::io::ImageWriterPNG:
vtkm::io::ImageWriterBase

Public Member Functions

VTKM_CONT ~ImageWriterPNG () noexcept override
 
 ImageWriterPNG (const ImageWriterPNG &)=delete
 
ImageWriterPNGoperator= (const ImageWriterPNG &)=delete
 
- Public Member Functions inherited from vtkm::io::ImageWriterBase
VTKM_CONT ImageWriterBase (const char *filename)
 
VTKM_CONT ImageWriterBase (const std::string &filename)
 
virtual VTKM_CONT ~ImageWriterBase () noexcept
 
 ImageWriterBase (const ImageWriterBase &)=delete
 
ImageWriterBaseoperator= (const ImageWriterBase &)=delete
 
const VTKM_CONT std::string & GetFileName () const
 
VTKM_CONT void SetFileName (const std::string &filename)
 
virtual VTKM_CONT void WriteDataSet (const vtkm::cont::DataSet &dataSet, const std::string &colorField={})
 Write the color field of a data set to an image file. More...
 
VTKM_CONT PixelDepth GetPixelDepth () const
 
VTKM_CONT void SetPixelDepth (PixelDepth depth)
 

Protected Member Functions

VTKM_CONT void Write (vtkm::Id width, vtkm::Id height, const ColorArrayType &pixels) override
 
template<typename PixelType >
VTKM_CONT void WriteToFile (vtkm::Id width, vtkm::Id height, const ColorArrayType &pixels)
 

Private Types

using Superclass = vtkm::io::ImageWriterBase
 

Additional Inherited Members

- Public Types inherited from vtkm::io::ImageWriterBase
enum  PixelDepth { PixelDepth::PIXEL_8, PixelDepth::PIXEL_16 }
 
using ColorArrayType = vtkm::cont::ArrayHandle< vtkm::Vec4f_32 >
 
- Protected Attributes inherited from vtkm::io::ImageWriterBase
std::string FileName
 
PixelDepth Depth = PixelDepth::PIXEL_8
 

Detailed Description

Manages writing images using the PNG format via lodepng.

ImageWriterPNG extends vtkm::io::ImageWriterBase and implements writing images in a valid PNG format. It utilizes lodepng's encode file functions to write PNG images that are automatically compressed to optimal sizes relative to the actual bit complexity of the image.

Member Typedef Documentation

◆ Superclass

Constructor & Destructor Documentation

◆ ~ImageWriterPNG()

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

◆ ImageWriterPNG()

vtkm::io::ImageWriterPNG::ImageWriterPNG ( const ImageWriterPNG )
delete

Member Function Documentation

◆ operator=()

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

◆ Write()

VTKM_CONT void vtkm::io::ImageWriterPNG::Write ( vtkm::Id  width,
vtkm::Id  height,
const ColorArrayType pixels 
)
overrideprotectedvirtual

◆ WriteToFile()

template<typename PixelType >
VTKM_CONT void vtkm::io::ImageWriterPNG::WriteToFile ( vtkm::Id  width,
vtkm::Id  height,
const ColorArrayType pixels 
)
protected

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