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

Writing images using HDF5 Image format. More...

#include <ImageWriterHDF5.h>

Inheritance diagram for vtkm::io::ImageWriterHDF5:
vtkm::io::ImageWriterBase

Public Member Functions

VTKM_CONT ~ImageWriterHDF5 () noexcept override
 
 ImageWriterHDF5 (const ImageWriterHDF5 &)=delete
 
ImageWriterHDF5operator= (const ImageWriterHDF5 &)=delete
 
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...
 
- 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)
 
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
 

Private Types

using Superclass = vtkm::io::ImageWriterBase
 

Private Member Functions

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

Private Attributes

std::int64_t fileid = 0
 
std::string fieldName
 

Static Private Attributes

static constexpr auto IMAGE_CLASS = "IMAGE"
 
static constexpr auto IMAGE_VERSION = "1.2"
 

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

Writing images using HDF5 Image format.

ImageWriterHDF5 extends vtkm::io::ImageWriterBase and implements writing image HDF5 file format. It conforms to the HDF5 Image Specification https://portal.hdfgroup.org/display/HDF5/HDF5+Image+and+Palette+Specification%2C+Version+1.2

Member Typedef Documentation

◆ Superclass

Constructor & Destructor Documentation

◆ ~ImageWriterHDF5()

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

◆ ImageWriterHDF5()

vtkm::io::ImageWriterHDF5::ImageWriterHDF5 ( const ImageWriterHDF5 )
delete

Member Function Documentation

◆ operator=()

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

◆ Write()

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

◆ WriteDataSet()

VTKM_CONT void vtkm::io::ImageWriterHDF5::WriteDataSet ( const vtkm::cont::DataSet dataSet,
const std::string &  colorField = {} 
)
virtual

Write the color field of a data set to an image file.

The DataSet must have a 2D structured cell set.

The specified color field must be of type ColorArrayType (a basic ArrayHandle of vtkm::Vec4f_32). If no color field name is given, the first point field that matches this criteria is written.

Reimplemented from vtkm::io::ImageWriterBase.

◆ WriteToFile()

template<typename PixelType >
VTKM_CONT int vtkm::io::ImageWriterHDF5::WriteToFile ( vtkm::Id  width,
vtkm::Id  height,
const ColorArrayType pixels 
)
private

Member Data Documentation

◆ fieldName

std::string vtkm::io::ImageWriterHDF5::fieldName
private

◆ fileid

std::int64_t vtkm::io::ImageWriterHDF5::fileid = 0
private

◆ IMAGE_CLASS

constexpr auto vtkm::io::ImageWriterHDF5::IMAGE_CLASS = "IMAGE"
staticconstexprprivate

◆ IMAGE_VERSION

constexpr auto vtkm::io::ImageWriterHDF5::IMAGE_VERSION = "1.2"
staticconstexprprivate

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