VTK-m  2.0
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 
29 class VTKM_IO_EXPORT ImageWriterPNM : public vtkm::io::ImageWriterBase
30 {
32 
33 public:
34  using Superclass::Superclass;
35  VTKM_CONT ~ImageWriterPNM() noexcept override;
36  ImageWriterPNM(const ImageWriterPNM&) = delete;
37  ImageWriterPNM& operator=(const ImageWriterPNM&) = delete;
38 
44  VTKM_CONT void Write(vtkm::Id width, vtkm::Id height, const ColorArrayType& pixels) override;
45 
46 protected:
47  template <typename PixelType>
48  VTKM_CONT void WriteToFile(vtkm::Id width, vtkm::Id height, const ColorArrayType& pixels);
49 };
50 }
51 } // namespace vtkm::io
52 
53 #endif //vtk_m_io_ImageWriterPNM_h
vtkm::cont::ArrayHandle< vtkm::Vec4f_32 >
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
Manages writing images using the PNM format.
Definition: ImageWriterPNM.h:29
vtkm::Id
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
ImageWriterBase.h
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57