VTK-m  2.1
ImageWriterPNM.h
Go to the documentation of this file.
1 //============================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //============================================================================
10 #ifndef vtk_m_io_ImageWriterPNM_h
11 #define vtk_m_io_ImageWriterPNM_h
12 
14 
15 namespace vtkm
16 {
17 namespace io
18 {
19 
31 {
33 
34 public:
35  using Superclass::Superclass;
36  VTKM_CONT ~ImageWriterPNM() noexcept override;
37  ImageWriterPNM(const ImageWriterPNM&) = delete;
38  ImageWriterPNM& operator=(const ImageWriterPNM&) = delete;
39 
45  VTKM_CONT void Write(vtkm::Id width, vtkm::Id height, const ColorArrayType& pixels) override;
46 
47 protected:
48  template <typename PixelType>
49  VTKM_CONT void WriteToFile(vtkm::Id width, vtkm::Id height, const ColorArrayType& pixels);
50 };
51 }
52 } // namespace vtkm::io
53 
54 #endif //vtk_m_io_ImageWriterPNM_h
vtkm::cont::ArrayHandle
Manages an array-worth of data.
Definition: ArrayHandle.h:300
vtkm::io::ImageWriterBase
Manages writing, and loading data from images.
Definition: ImageWriterBase.h:35
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::io::ImageWriterPNM
Writes images using the PNM format.
Definition: ImageWriterPNM.h:30
VTKM_IO_EXPORT
#define VTKM_IO_EXPORT
Definition: vtkm_io_export.h:44
ImageWriterBase.h
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::Id
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227