vtkImageWeightedSum Class Reference

#include <vtkImageWeightedSum.h>

Inheritance diagram for vtkImageWeightedSum:

Inheritance graph
[legend]
Collaboration diagram for vtkImageWeightedSum:

Collaboration graph
[legend]

List of all members.


Detailed Description

adds any number of images, weighting each according to the weight set using this->SetWeights(i,w).

All weights are normalized so they will sum to 1. Images must have the same extents. Output is

Thanks:
The original author of this class is Lauren O'Donnell (MIT) for Slicer
Tests:
vtkImageWeightedSum (Tests)

Definition at line 36 of file vtkImageWeightedSum.h.


Public Types

typedef vtkThreadedImageAlgorithm Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetWeight (vtkIdType id, double weight)
double CalculateTotalWeight ()
virtual void SetWeights (vtkDoubleArray *)
virtual vtkDoubleArrayGetWeights ()
virtual int GetNormalizeByWeight ()
virtual void SetNormalizeByWeight (int)
virtual void NormalizeByWeightOn ()
virtual void NormalizeByWeightOff ()

Static Public Member Functions

static vtkImageWeightedSumNew ()
static int IsTypeOf (const char *type)
static vtkImageWeightedSumSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkImageWeightedSum ()
 ~vtkImageWeightedSum ()
int RequestInformation (vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), vtkInformationVector *outputVector)
void ThreadedRequestData (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int ext[6], int id)
int FillInputPortInformation (int i, vtkInformation *info)

Protected Attributes

vtkDoubleArrayWeights
int NormalizeByWeight

Member Typedef Documentation

Reimplemented from vtkThreadedImageAlgorithm.

Definition at line 40 of file vtkImageWeightedSum.h.


Constructor & Destructor Documentation

vtkImageWeightedSum::vtkImageWeightedSum (  )  [protected]

vtkImageWeightedSum::~vtkImageWeightedSum (  )  [protected]


Member Function Documentation

static vtkImageWeightedSum* vtkImageWeightedSum::New (  )  [static]

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkAlgorithm.

virtual const char* vtkImageWeightedSum::GetClassName (  )  [virtual]

Reimplemented from vtkThreadedImageAlgorithm.

static int vtkImageWeightedSum::IsTypeOf ( const char *  name  )  [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 vtkThreadedImageAlgorithm.

virtual int vtkImageWeightedSum::IsA ( const char *  name  )  [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 vtkThreadedImageAlgorithm.

static vtkImageWeightedSum* vtkImageWeightedSum::SafeDownCast ( vtkObject o  )  [static]

Reimplemented from vtkThreadedImageAlgorithm.

void vtkImageWeightedSum::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 vtkThreadedImageAlgorithm.

virtual void vtkImageWeightedSum::SetWeights ( vtkDoubleArray  )  [virtual]

The weights control the contribution of each input to the sum. They will be normalized to sum to 1 before filter execution.

virtual vtkDoubleArray* vtkImageWeightedSum::GetWeights (  )  [virtual]

The weights control the contribution of each input to the sum. They will be normalized to sum to 1 before filter execution.

virtual void vtkImageWeightedSum::SetWeight ( vtkIdType  id,
double  weight 
) [virtual]

Change a specific weight. Reallocation is done

virtual int vtkImageWeightedSum::GetNormalizeByWeight (  )  [virtual]

Setting NormalizeByWeight on will divide the final result by the total weight of the component functions. This process does not otherwise normalize the weighted sum By default, NormalizeByWeight is on.

virtual void vtkImageWeightedSum::SetNormalizeByWeight ( int   )  [virtual]

Setting NormalizeByWeight on will divide the final result by the total weight of the component functions. This process does not otherwise normalize the weighted sum By default, NormalizeByWeight is on.

virtual void vtkImageWeightedSum::NormalizeByWeightOn (  )  [virtual]

Setting NormalizeByWeight on will divide the final result by the total weight of the component functions. This process does not otherwise normalize the weighted sum By default, NormalizeByWeight is on.

virtual void vtkImageWeightedSum::NormalizeByWeightOff (  )  [virtual]

Setting NormalizeByWeight on will divide the final result by the total weight of the component functions. This process does not otherwise normalize the weighted sum By default, NormalizeByWeight is on.

double vtkImageWeightedSum::CalculateTotalWeight (  ) 

Compute the total value of all the weight

int vtkImageWeightedSum::RequestInformation ( vtkInformation vtkNotUsedrequest,
vtkInformationVector **  vtkNotUsedinputVector,
vtkInformationVector outputVector 
) [protected]

void vtkImageWeightedSum::ThreadedRequestData ( vtkInformation request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector,
vtkImageData ***  inData,
vtkImageData **  outData,
int  extent[6],
int  threadId 
) [protected, virtual]

If the subclass does not define an Execute method, then the task will be broken up, multiple threads will be spawned, and each thread will call this method. It is public so that the thread functions can call this method.

Reimplemented from vtkThreadedImageAlgorithm.

int vtkImageWeightedSum::FillInputPortInformation ( int  port,
vtkInformation info 
) [protected, virtual]

Fill the input port information objects for this algorithm. This is invoked by the first call to GetInputPortInformation for each port so subclasses can specify what they can handle.

Reimplemented from vtkImageAlgorithm.


Member Data Documentation

Definition at line 71 of file vtkImageWeightedSum.h.

Definition at line 74 of file vtkImageWeightedSum.h.


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

Generated on Wed Jun 3 19:11:48 2009 for VTK by  doxygen 1.5.6