vtkSMUtilities.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
10 #ifndef vtkSMUtilities_h
11 #define vtkSMUtilities_h
12 
13 #include "vtkRemotingViewsModule.h" //needed for exports
14 #include "vtkSMObject.h"
15 #include "vtkSmartPointer.h" // needed for vtkSmartPointer
16 #include <vector> // needed for std::vector
17 
18 class vtkImageData;
19 class vtkPoints;
21 {
22 public:
23  static vtkSMUtilities* New();
24  vtkTypeMacro(vtkSMUtilities, vtkSMObject);
25  void PrintSelf(ostream& os, vtkIndent indent) override;
26 
34  static int SaveImage(vtkImageData* image, const char* filename, int quality);
35  static int SaveImage(vtkImageData* image, const char* filename)
36  {
37  return vtkSMUtilities::SaveImage(image, filename, -1);
38  }
39 
44  static int SaveImage(vtkImageData* image, const char* filename, const char* writerName);
45 
50  static int SaveImageOnProcessZero(
51  vtkImageData* image, const char* filename, const char* writerName);
52 
60  static vtkPoints* CreateOrbit(
61  const double center[3], const double normal[3], int resolution, const double startPoint[3]);
62 
63  // Will pick an arbitrary starting point
64  static vtkPoints* CreateOrbit(
65  const double center[3], const double normal[3], double radius, int resolution);
66 
72  static void Merge(vtkImageData* dest, vtkImageData* src, int borderWidth = 0,
73  const unsigned char* borderColorRGB = nullptr);
74 
78  static vtkSmartPointer<vtkImageData> MergeImages(
79  const std::vector<vtkSmartPointer<vtkImageData>>& images, int borderWidth = 0,
80  const unsigned char* borderColorRGB = nullptr);
81 
87  static void FillImage(vtkImageData* image, const int extent[6], const unsigned char rgb[3]);
88 
89 protected:
90  vtkSMUtilities() = default;
91  ~vtkSMUtilities() override = default;
92 
93 private:
94  vtkSMUtilities(const vtkSMUtilities&) = delete;
95  void operator=(const vtkSMUtilities&) = delete;
96 };
97 
98 #endif
#define VTKREMOTINGVIEWS_EXPORT
static int SaveImage(vtkImageData *image, const char *filename, int quality)
Save the image to a file.
superclass for most server manager classes
Definition: vtkSMObject.h:17
static int SaveImage(vtkImageData *image, const char *filename)
collection of utility methods.
static vtkSMObject * New()
resolution
image
center
extent
radius
void PrintSelf(ostream &os, vtkIndent indent) override