ParaView
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
vtkSMUtilities Class Reference

collection of utility methods. More...

#include <vtkSMUtilities.h>

Inheritance diagram for vtkSMUtilities:
Inheritance graph
[legend]
Collaboration diagram for vtkSMUtilities:
Collaboration graph
[legend]

Public Types

typedef vtkSMObject Superclass
 
- Public Types inherited from vtkSMObject
typedef vtkObject Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent)
 
- Public Member Functions inherited from vtkSMObject
void PrintSelf (ostream &os, vtkIndent indent)
 

Static Public Member Functions

static vtkSMUtilitiesNew ()
 
static int IsTypeOf (const char *type)
 
static vtkSMUtilitiesSafeDownCast (vtkObject *o)
 
static int SaveImage (vtkImageData *image, const char *filename, int quality)
 Save the image to a file. More...
 
static int SaveImage (vtkImageData *image, const char *filename)
 
static int SaveImage (vtkImageData *image, const char *filename, const char *writerName)
 Save the image to a file using a vtkImageWriter subclass given by writerName. More...
 
static int SaveImageOnProcessZero (vtkImageData *image, const char *filename, const char *writerName)
 Calls SaveImage(image, filename, writerName) only on process 0. More...
 
static vtkPoints * CreateOrbit (const double center[3], const double normal[3], int resolution, const double startPoint[3])
 Returns the points an orbit to revolve around the center at a distance of radius in the plane defined by the center and the normal. More...
 
static vtkPoints * CreateOrbit (const double center[3], const double normal[3], double radius, int resolution)
 
static void Merge (vtkImageData *dest, vtkImageData *src, int borderWidth=0, const unsigned char *borderColorRGB=NULL)
 Convenience method used to merge a smaller image (src) into a larger one (dest). More...
 
static vtkSmartPointer< vtkImageData > MergeImages (const std::vector< vtkSmartPointer< vtkImageData > > &images, int borderWidth=0, const unsigned char *borderColorRGB=NULL)
 Merges multiple images into a single one and returns that. More...
 
static void FillImage (vtkImageData *image, const int extent[6], const unsigned char rgb[3])
 Fill the specified extents in the image with the given color. More...
 
- Static Public Member Functions inherited from vtkSMObject
static vtkSMObjectNew ()
 
static int IsTypeOf (const char *type)
 
static vtkSMObjectSafeDownCast (vtkObject *o)
 

Protected Member Functions

 vtkSMUtilities ()
 
 ~vtkSMUtilities ()
 
- Protected Member Functions inherited from vtkSMObject
 vtkSMObject ()
 
 ~vtkSMObject ()
 

Detailed Description

collection of utility methods.

vtkSMUtilities defines a collection of useful static methods.

Definition at line 32 of file vtkSMUtilities.h.

Member Typedef Documentation

◆ Superclass

Definition at line 36 of file vtkSMUtilities.h.

Constructor & Destructor Documentation

◆ vtkSMUtilities()

vtkSMUtilities::vtkSMUtilities ( )
inlineprotected

Definition at line 102 of file vtkSMUtilities.h.

◆ ~vtkSMUtilities()

vtkSMUtilities::~vtkSMUtilities ( )
inlineprotected

Definition at line 103 of file vtkSMUtilities.h.

Member Function Documentation

◆ New()

static vtkSMUtilities* vtkSMUtilities::New ( )
static

◆ GetClassName()

virtual const char* vtkSMUtilities::GetClassName ( )
virtual

Reimplemented from vtkSMObject.

◆ IsTypeOf()

static int vtkSMUtilities::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual int vtkSMUtilities::IsA ( const char *  type)
virtual

Reimplemented from vtkSMObject.

◆ SafeDownCast()

static vtkSMUtilities* vtkSMUtilities::SafeDownCast ( vtkObject *  o)
static

◆ PrintSelf()

void vtkSMUtilities::PrintSelf ( ostream &  os,
vtkIndent  indent 
)

◆ SaveImage() [1/3]

static int vtkSMUtilities::SaveImage ( vtkImageData *  image,
const char *  filename,
int  quality 
)
static

Save the image to a file.

The file is created on the process on which this method is called. Return vtkErrorCode::NoError (0) on success, otherwise returns the error code. / quality [0,100] – 0 = low, 100=high, -1=default

◆ SaveImage() [2/3]

static int vtkSMUtilities::SaveImage ( vtkImageData *  image,
const char *  filename 
)
inlinestatic

Definition at line 47 of file vtkSMUtilities.h.

◆ SaveImage() [3/3]

static int vtkSMUtilities::SaveImage ( vtkImageData *  image,
const char *  filename,
const char *  writerName 
)
static

Save the image to a file using a vtkImageWriter subclass given by writerName.

The file is created on the process on which this method is called.

◆ SaveImageOnProcessZero()

static int vtkSMUtilities::SaveImageOnProcessZero ( vtkImageData *  image,
const char *  filename,
const char *  writerName 
)
static

Calls SaveImage(image, filename, writerName) only on process 0.

Other processes will recieve the return code through a broadcast.

◆ CreateOrbit() [1/2]

static vtkPoints* vtkSMUtilities::CreateOrbit ( const double  center[3],
const double  normal[3],
int  resolution,
const double  startPoint[3] 
)
static

Returns the points an orbit to revolve around the center at a distance of radius in the plane defined by the center and the normal.

The number of points returned is equal to resolution. Returns a new instance of vtkPoints. The caller is responsible for freeing the allocated memory.

◆ CreateOrbit() [2/2]

static vtkPoints* vtkSMUtilities::CreateOrbit ( const double  center[3],
const double  normal[3],
double  radius,
int  resolution 
)
static

◆ Merge()

static void vtkSMUtilities::Merge ( vtkImageData *  dest,
vtkImageData *  src,
int  borderWidth = 0,
const unsigned char *  borderColorRGB = NULL 
)
static

Convenience method used to merge a smaller image (src) into a larger one (dest).

The location of the smaller image in the larger image are determined by their extents.

◆ MergeImages()

static vtkSmartPointer<vtkImageData> vtkSMUtilities::MergeImages ( const std::vector< vtkSmartPointer< vtkImageData > > &  images,
int  borderWidth = 0,
const unsigned char *  borderColorRGB = NULL 
)
static

Merges multiple images into a single one and returns that.

◆ FillImage()

static void vtkSMUtilities::FillImage ( vtkImageData *  image,
const int  extent[6],
const unsigned char  rgb[3] 
)
static

Fill the specified extents in the image with the given color.

If the image is a 4 component image, then this method fills the 4th component with 0xff.


The documentation for this class was generated from the following file: