Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# vtkImageStencilSource Class Reference

`#include <vtkImageStencilSource.h>`

Inheritance diagram for vtkImageStencilSource:

[legend]
Collaboration diagram for vtkImageStencilSource:

[legend]
List of all members.

## Detailed Description

helper class for clipping images

Date:
  2002/12/11 14:26:22

Revision:
  1.8

vtkImageStencilSource is a helper class for vtkImageToImageFilter classes. Given a clipping object such as a vtkImplicitFunction, it will set up a list of clipping extents for each x-row through the image data. The extents for each x-row can be retrieved via the GetNextExtent() method after the extent lists have been built with the BuildExtents() method. For large images, using clipping extents is much more memory efficient (and slightly more time-efficient) than building a mask. This class can be subclassed to allow clipping with objects other than vtkImplicitFunction.

See also:
  vtkImplicitFunction vtkImageStencil vtkImagePolyDataStencilSource

Created by:
  - Gobbi, David

CVS contributions (if > 5%):
  - Gobbi, David (82%)
  - Schroeder, Will (10%)
  - Cedilnik, Andy (5%)

CVS logs (CVSweb):
  - .`h` (`/Imaging/vtkImageStencilSource.h)`
  - .`cxx` (`/Imaging/vtkImageStencilSource.cxx)`

Definition at line 55 of file vtkImageStencilSource.h.

## Public Types

typedef vtkSource | Superclass

## Public Methods

virtual const char * | GetClassName ()
virtual int | IsA (const char *type)
void | PrintSelf (ostream &os, vtkIndent indent)
void | SetOutput (vtkImageStencilData *output)
vtkImageStencilData * | GetOutput ()

## Static Public Methods

vtkImageStencilSource * | New ()
int | IsTypeOf (const char *type)
vtkImageStencilSource * | SafeDownCast (vtkObject *o)

## Protected Methods

| vtkImageStencilSource ()
| ~vtkImageStencilSource ()
void | ExecuteData (vtkDataObject *out)
vtkImageStencilData * | AllocateOutputData (vtkDataObject *out)
virtual void | ThreadedExecute (vtkImageStencilData *output, int extent[6], int threadId)

## Member Typedef Documentation

typedef vtkSource vtkImageStencilSource::Superclass

| Reimplemented from vtkSource. Reimplemented in vtkPolyDataToImageStencil, vtkImageToImageStencil, and vtkImplicitFunctionToImageStencil. Definition at line 59 of file vtkImageStencilSource.h.

## Constructor & Destructor Documentation

vtkImageStencilSource::vtkImageStencilSource | ( |  | ) | `[protected]`

vtkImageStencilSource::~vtkImageStencilSource | ( |  | ) | `[protected]`

## Member Function Documentation

vtkImageStencilSource* vtkImageStencilSource::New | ( |  | ) | `[static]`

| Create an object with Debug turned off, modified time initialized to zero, and reference counting on. Reimplemented from vtkObject. Reimplemented in vtkPolyDataToImageStencil, vtkImageToImageStencil, and vtkImplicitFunctionToImageStencil.

virtual const char* vtkImageStencilSource::GetClassName | ( |  | ) | `[virtual]`

| Reimplemented from vtkSource. Reimplemented in vtkPolyDataToImageStencil, vtkImageToImageStencil, and vtkImplicitFunctionToImageStencil.

int vtkImageStencilSource::IsTypeOf | ( | const char * | type | ) | `[static]`

| Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkSource. Reimplemented in vtkPolyDataToImageStencil, vtkImageToImageStencil, and vtkImplicitFunctionToImageStencil.

virtual int vtkImageStencilSource::IsA | ( | const char * | type | ) | `[virtual]`

| Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkSource. Reimplemented in vtkPolyDataToImageStencil, vtkImageToImageStencil, and vtkImplicitFunctionToImageStencil.

vtkImageStencilSource* vtkImageStencilSource::SafeDownCast | ( | vtkObject * | o | ) | `[static]`

| Reimplemented from vtkSource. Reimplemented in vtkPolyDataToImageStencil, vtkImageToImageStencil, and vtkImplicitFunctionToImageStencil.

void vtkImageStencilSource::PrintSelf | ( | ostream & | os,
|  | vtkIndent | indent
| ) | `[virtual]`

| Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from vtkSource. Reimplemented in vtkPolyDataToImageStencil, vtkImageToImageStencil, and vtkImplicitFunctionToImageStencil.

void vtkImageStencilSource::SetOutput | ( | vtkImageStencilData * | output | ) |

| Get or set the output for this source.

vtkImageStencilData* vtkImageStencilSource::GetOutput | ( |  | ) |

| Get or set the output for this source.

void vtkImageStencilSource::ExecuteData | ( | vtkDataObject * | out | ) | `[protected]`

| Reimplemented in vtkPolyDataToImageStencil.

vtkImageStencilData* vtkImageStencilSource::AllocateOutputData | ( | vtkDataObject * | out | ) | `[protected]`

virtual void vtkImageStencilSource::ThreadedExecute | ( | vtkImageStencilData * | output,
|  | int | extent[6],
|  | int | threadId
| ) | `[protected, virtual]`

| Override this method to support clipping with different kinds of objects. Eventually the extent could be split up and handled by multiple threads, but it isn't for now. But please ensure that all code inside this method is thread-safe. Reimplemented in vtkPolyDataToImageStencil, vtkImageToImageStencil, and vtkImplicitFunctionToImageStencil.

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

- Imaging/vtkImageStencilSource.h