vtkSMUtilities.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMUtilities.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
22 #ifndef vtkSMUtilities_h
23 #define vtkSMUtilities_h
24 
25 #include "vtkRemotingViewsModule.h" //needed for exports
26 #include "vtkSMObject.h"
27 #include "vtkSmartPointer.h" // needed for vtkSmartPointer
28 #include <vector> // needed for std::vector
29 
30 class vtkImageData;
31 class vtkPoints;
33 {
34 public:
35  static vtkSMUtilities* New();
36  vtkTypeMacro(vtkSMUtilities, vtkSMObject);
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
46  static int SaveImage(vtkImageData* image, const char* filename, int quality);
47  static int SaveImage(vtkImageData* image, const char* filename)
48  {
49  return vtkSMUtilities::SaveImage(image, filename, -1);
50  }
51 
56  static int SaveImage(vtkImageData* image, const char* filename, const char* writerName);
57 
62  static int SaveImageOnProcessZero(
63  vtkImageData* image, const char* filename, const char* writerName);
64 
72  static vtkPoints* CreateOrbit(
73  const double center[3], const double normal[3], int resolution, const double startPoint[3]);
74 
75  // Will pick an arbitrary starting point
76  static vtkPoints* CreateOrbit(
77  const double center[3], const double normal[3], double radius, int resolution);
78 
84  static void Merge(vtkImageData* dest, vtkImageData* src, int borderWidth = 0,
85  const unsigned char* borderColorRGB = NULL);
86 
90  static vtkSmartPointer<vtkImageData> MergeImages(
91  const std::vector<vtkSmartPointer<vtkImageData> >& images, int borderWidth = 0,
92  const unsigned char* borderColorRGB = NULL);
93 
99  static void FillImage(vtkImageData* image, const int extent[6], const unsigned char rgb[3]);
100 
101 protected:
103  ~vtkSMUtilities() override {}
104 
105 private:
106  vtkSMUtilities(const vtkSMUtilities&) = delete;
107  void operator=(const vtkSMUtilities&) = delete;
108 };
109 
110 #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:29
static int SaveImage(vtkImageData *image, const char *filename)
~vtkSMUtilities() override
collection of utility methods.
static vtkSMObject * New()
resolution
image
center
extent
radius
void PrintSelf(ostream &os, vtkIndent indent) override