Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends

vtkKWERepresentativeVolumeImageCreator Class Reference

Create a representative image given a volume and properties. More...

#include <vtkKWERepresentativeVolumeImageCreator.h>

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

List of all members.

Public Types

enum  {
  XSideView = 0, MinusXSideView, YSideView, MinusYSideView,
  ZSideView, MinusZSideView
}
enum  {
  LeftSideView = 0, RightSideView, PosteriorSideView, AnteriorSideView,
  SuperiorSideView, InferiorSideView
}

Public Member Functions

 vtkTypeRevisionMacro (vtkKWERepresentativeVolumeImageCreator, vtkObject)
void PrintSelf (ostream &os, vtkIndent indent)
void SetProperty (vtkVolumeProperty *p)
void SetInput (vtkImageData *volume)
void Start ()
void Stop ()
int IsProcessing ()
int IsValid ()
vtkImageDataGetRepresentativeImage ()

virtual vtkVolumePropertyGetProperty ()

virtual void SetBlendMode (int)
void SetBlendModeToComposite ()
void SetBlendModeToMaximumIntensity ()
void SetBlendModeToMinimumIntensity ()
virtual int GetBlendMode ()

virtual vtkImageDataGetInput ()

void SetRepresentativeImageSize (int w, int h)
void SetRepresentativeImageSize (int size[2])

virtual int * GetRepresentativeImageSize ()
virtual void GetRepresentativeImageSize (int data[3])

virtual void SetVisibleSide (int)

virtual int GetVisibleSide ()

Static Public Member Functions

static
vtkKWERepresentativeVolumeImageCreator
New ()

Protected Member Functions

 vtkKWERepresentativeVolumeImageCreator ()
 ~vtkKWERepresentativeVolumeImageCreator ()
void GenerateImage (int *flag, vtkMutexLock *lock)
void ClearInternalParameters ()
void ComputeFirstVoxel (int i, int j, float voxel[3])
void ComputeRayIncrement (float increment[3])
void CastRay (float voxel[3], float increment[3], unsigned char color[3])
void UpdateTransferFunctions (double sampleDistance)
double ComputeSampleDistance (float rayIncrement[3])

Protected Attributes

vtkVolumePropertyProperty
int BlendMode
vtkImageDataInput
vtkVolumePropertyInternalProperty
int InternalBlendMode
vtkImageDataInternalInput
vtkImageDataRepresentativeImage
vtkMutexLockRepresentativeImageIsValidLock
int RepresentativeImageIsValid
int RepresentativeImageSize [2]
int VisibleSide
vtkMultiThreaderThreader
int SpawnedThreadID
float TableOffset [4]
float TableScale [4]
float ColorTable [4][1024 *3]
float OpacityTable [4][1024]
int TableComponents
int TableIndependentComponents

Friends

class vtkKWERVICFriend
VTK_THREAD_RETURN_TYPE vtkKWERVICGenerateImage (void *arg)

Detailed Description

Create a representative image given a volume and properties.

vtkKWEResprentativeVolumeImageCreator is a class that will generate reprentative images of a volume given some properties such as the color and opacity transfer functions (contained in a vtkVolumeProperty), the blending mode, and the input volume. It will create a representative image of the requested size in a background thread. It is assumed that the Stop() method will be called by the calling process before any of the input parameters are modified. The IsComplete() method will return 0 if the image is still being generated or if an error occurred, and 1 if the image generation process is complete. The IsValid() method will return 1 if the genterated image is valid, or 0 if an error occurred during the computation (e.g. due to missing input parameters).

Limitations:
  • Works only on the scalars in the point data of the input
  • Does not do gradient opacity -----------------------------------------------------------------------------

Definition at line 67 of file vtkKWERepresentativeVolumeImageCreator.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
XSideView 
MinusXSideView 
YSideView 
MinusYSideView 
ZSideView 
MinusZSideView 

Definition at line 163 of file vtkKWERepresentativeVolumeImageCreator.h.

anonymous enum
Enumerator:
LeftSideView 
RightSideView 
PosteriorSideView 
AnteriorSideView 
SuperiorSideView 
InferiorSideView 

Definition at line 173 of file vtkKWERepresentativeVolumeImageCreator.h.


Constructor & Destructor Documentation

vtkKWERepresentativeVolumeImageCreator::vtkKWERepresentativeVolumeImageCreator (  )  [protected]
vtkKWERepresentativeVolumeImageCreator::~vtkKWERepresentativeVolumeImageCreator (  )  [protected]

Member Function Documentation

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

Reimplemented from vtkObject.

vtkKWERepresentativeVolumeImageCreator::vtkTypeRevisionMacro ( vtkKWERepresentativeVolumeImageCreator  ,
vtkObject   
)
void vtkKWERepresentativeVolumeImageCreator::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Reimplemented from vtkObject.

void vtkKWERepresentativeVolumeImageCreator::SetProperty ( vtkVolumeProperty p  ) 

Set the vtkVolumeProperty. This will be used for the various transfer function, and the component information.

virtual vtkVolumeProperty* vtkKWERepresentativeVolumeImageCreator::GetProperty (  )  [virtual]

Get the current property

virtual void vtkKWERepresentativeVolumeImageCreator::SetBlendMode ( int   )  [virtual]

Set/Get the blend mode.

void vtkKWERepresentativeVolumeImageCreator::SetBlendModeToComposite (  )  [inline]

Set/Get the blend mode.

Definition at line 86 of file vtkKWERepresentativeVolumeImageCreator.h.

void vtkKWERepresentativeVolumeImageCreator::SetBlendModeToMaximumIntensity (  )  [inline]

Set/Get the blend mode.

Definition at line 88 of file vtkKWERepresentativeVolumeImageCreator.h.

void vtkKWERepresentativeVolumeImageCreator::SetBlendModeToMinimumIntensity (  )  [inline]

Set/Get the blend mode.

Definition at line 90 of file vtkKWERepresentativeVolumeImageCreator.h.

virtual int vtkKWERepresentativeVolumeImageCreator::GetBlendMode (  )  [virtual]

Set/Get the blend mode.

void vtkKWERepresentativeVolumeImageCreator::SetInput ( vtkImageData volume  ) 

Set the input volume

virtual vtkImageData* vtkKWERepresentativeVolumeImageCreator::GetInput (  )  [virtual]

Get the input volume

void vtkKWERepresentativeVolumeImageCreator::Start (  ) 

Start generating the image. This is a non-blocking operation - the image will be generated in a background thread. Use IsProcessing() to poll whether it is done, or register for the End event.

void vtkKWERepresentativeVolumeImageCreator::Stop (  ) 

Stop generating the image.

int vtkKWERepresentativeVolumeImageCreator::IsProcessing (  ) 

Is this class still working on generating the image? A return value of 1 means that the class is still actively processing the image. Otherwise the return value will be 0.

int vtkKWERepresentativeVolumeImageCreator::IsValid (  ) 

Is the generated image valid? This will return 0 if IsProcessing() returns 1. It will also return 0 if an error occurred during the last image creation attempt, or if no image has been created. Otherwise it will return 1.

void vtkKWERepresentativeVolumeImageCreator::SetRepresentativeImageSize ( int  w,
int  h 
)

Set the size of the representative image. The default value is (0,0) which is invalid, so this must be set before calling Start(). The width / height must be at least 1 and at most 1024.

void vtkKWERepresentativeVolumeImageCreator::SetRepresentativeImageSize ( int  size[2]  )  [inline]

Set the size of the representative image. The default value is (0,0) which is invalid, so this must be set before calling Start(). The width / height must be at least 1 and at most 1024.

Definition at line 127 of file vtkKWERepresentativeVolumeImageCreator.h.

virtual int* vtkKWERepresentativeVolumeImageCreator::GetRepresentativeImageSize (  )  [virtual]

Get the size of the representative image. A value of (0,0) means the size was never set.

virtual void vtkKWERepresentativeVolumeImageCreator::GetRepresentativeImageSize ( int  data[3]  )  [virtual]

Get the size of the representative image. A value of (0,0) means the size was never set.

vtkImageData* vtkKWERepresentativeVolumeImageCreator::GetRepresentativeImage (  ) 

Get the representative image. Should only be called after Start() has been called, and IsProcessing() is 0, and IsValid() is 1. This will create a new vtkImageData that the caller should immediately register since this class will release its hold on it when Start() is called again.

virtual void vtkKWERepresentativeVolumeImageCreator::SetVisibleSide ( int   )  [virtual]

Select the side to view. An XSideView implied that the +X size of the data is visible - the viewing direction is (-1, 0, 0). The two sets of enumerated types are equivalent views using different terminology (scientific X,Y,Z right handed coordinate system vs. medical R, A, S left-handed coordinate system)

virtual int vtkKWERepresentativeVolumeImageCreator::GetVisibleSide (  )  [virtual]

Get the visible side of the volume. See SetVisibleSide for further clarification.

void vtkKWERepresentativeVolumeImageCreator::GenerateImage ( int *  flag,
vtkMutexLock lock 
) [protected]
void vtkKWERepresentativeVolumeImageCreator::ClearInternalParameters (  )  [protected]
void vtkKWERepresentativeVolumeImageCreator::ComputeFirstVoxel ( int  i,
int  j,
float  voxel[3] 
) [protected]
void vtkKWERepresentativeVolumeImageCreator::ComputeRayIncrement ( float  increment[3]  )  [protected]
void vtkKWERepresentativeVolumeImageCreator::CastRay ( float  voxel[3],
float  increment[3],
unsigned char  color[3] 
) [protected]
void vtkKWERepresentativeVolumeImageCreator::UpdateTransferFunctions ( double  sampleDistance  )  [protected]
double vtkKWERepresentativeVolumeImageCreator::ComputeSampleDistance ( float  rayIncrement[3]  )  [protected]

Friends And Related Function Documentation

friend class vtkKWERVICFriend [friend]

Definition at line 189 of file vtkKWERepresentativeVolumeImageCreator.h.

VTK_THREAD_RETURN_TYPE vtkKWERVICGenerateImage ( void *  arg  )  [friend]

Member Data Documentation

Definition at line 196 of file vtkKWERepresentativeVolumeImageCreator.h.

Definition at line 197 of file vtkKWERepresentativeVolumeImageCreator.h.

Definition at line 198 of file vtkKWERepresentativeVolumeImageCreator.h.

Definition at line 200 of file vtkKWERepresentativeVolumeImageCreator.h.

Definition at line 201 of file vtkKWERepresentativeVolumeImageCreator.h.

Definition at line 202 of file vtkKWERepresentativeVolumeImageCreator.h.

Definition at line 204 of file vtkKWERepresentativeVolumeImageCreator.h.

Definition at line 205 of file vtkKWERepresentativeVolumeImageCreator.h.

Definition at line 206 of file vtkKWERepresentativeVolumeImageCreator.h.

Definition at line 207 of file vtkKWERepresentativeVolumeImageCreator.h.

Definition at line 209 of file vtkKWERepresentativeVolumeImageCreator.h.

Definition at line 211 of file vtkKWERepresentativeVolumeImageCreator.h.

Definition at line 213 of file vtkKWERepresentativeVolumeImageCreator.h.

Definition at line 224 of file vtkKWERepresentativeVolumeImageCreator.h.

Definition at line 225 of file vtkKWERepresentativeVolumeImageCreator.h.

Definition at line 226 of file vtkKWERepresentativeVolumeImageCreator.h.

Definition at line 227 of file vtkKWERepresentativeVolumeImageCreator.h.

Definition at line 228 of file vtkKWERepresentativeVolumeImageCreator.h.

Definition at line 229 of file vtkKWERepresentativeVolumeImageCreator.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines