VTK-m  2.2
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

 ~ImageWriterHDF5 () noexcept override
 
 ImageWriterHDF5 (const ImageWriterHDF5 &)=delete
 
ImageWriterHDF5operator= (const ImageWriterHDF5 &)=delete
 
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
 ImageWriterBase (const char *filename)
 
 ImageWriterBase (const std::string &filename)
 Construct a writer to save data to the given file. More...
 
virtual ~ImageWriterBase () noexcept
 
 ImageWriterBase (const ImageWriterBase &)=delete
 
ImageWriterBaseoperator= (const ImageWriterBase &)=delete
 
PixelDepth GetPixelDepth () const
 Specify the number of bits used by each color channel. More...
 
void SetPixelDepth (PixelDepth depth)
 Specify the number of bits used by each color channel. More...
 
const std::string & GetFileName () const
 
void SetFileName (const std::string &filename)
 

Protected Member Functions

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 >
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::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()

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

◆ WriteDataSet()

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 >
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: