wxMaracasMultipleVolumeRendererManagerData Class Reference

#include <wxMaracasMultipleVolumeRendererManagerData.h>

List of all members.

Public Member Functions

 wxMaracasMultipleVolumeRendererManagerData (vtkImageData *vol, std::string dataname="")
 ~wxMaracasMultipleVolumeRendererManagerData ()
void checkInvariant () throw (char *)
void Update ()
vtkProp3D * getProp3D ()
int getId ()
void setId (int propid)
std::string getDataname ()
void setDataname (std::string dataname)
void setVolumeColor (std::vector< double > &greylevel, std::vector< double > &red, std::vector< double > &green, std::vector< double > &blue)
void setVolumeOpacity (std::vector< double > greylevel, std::vector< double > value)
vtkPiecewiseFunction * GetTransferFunction ()
vtkColorTransferFunction * GetColorFunction ()
void changeCompositeMIPFunction (int function) throw (char *)

Protected Attributes

vtkImageData * _vol
std::string _dataname

Private Attributes

int _id
vtkVolumeRayCastCompositeFunction * _compositeFunction
vtkPlanes * _volumePlanes
vtkVolumeRayCastMapper * _volumeMapper
vtkVolumeProperty * _volumeProperty
vtkVolume * _newvol
vtkPiecewiseFunction * _tfun
vtkColorTransferFunction * _ctfun
vtkVolumeRayCastMIPFunction * _MIPFunction

Detailed Description

Definition at line 19 of file wxMaracasMultipleVolumeRendererManagerData.h.


Constructor & Destructor Documentation

wxMaracasMultipleVolumeRendererManagerData::wxMaracasMultipleVolumeRendererManagerData ( vtkImageData *  vol,
std::string  dataname = "" 
)

Definition at line 8 of file wxMaracasMultipleVolumeRendererManagerData.cxx.

References _compositeFunction, _ctfun, _dataname, _MIPFunction, _newvol, _tfun, _vol, _volumeMapper, _volumePlanes, and _volumeProperty.

00008                                                                                                                            {
00009 
00010         _vol = vol;     
00011         _dataname = dataname;
00012         
00013         _tfun = vtkPiecewiseFunction::New();
00014         _ctfun = vtkColorTransferFunction::New();   
00015 
00016         _volumePlanes  = vtkPlanes::New();
00017         _compositeFunction = vtkVolumeRayCastCompositeFunction::New();
00018         _MIPFunction = vtkVolumeRayCastMIPFunction::New();
00019 
00020         _volumeMapper = vtkVolumeRayCastMapper::New();  
00021         _volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
00022         _volumeMapper->SetClippingPlanes( _volumePlanes );
00023         _volumeMapper->AutoAdjustSampleDistancesOn();
00024         _volumeProperty = vtkVolumeProperty::New();     
00025         _volumeProperty->SetInterpolationTypeToLinear();
00026         //_volumeProperty->ShadeOn();
00027         _volumeProperty->DisableGradientOpacityOn();    
00028         _volumeProperty->SetColor(_ctfun);
00029         _volumeProperty->SetScalarOpacity(_tfun );
00030 
00031         _newvol = vtkVolume::New();
00032         _newvol->SetMapper(_volumeMapper );
00033         _newvol->SetProperty(_volumeProperty );
00034         _volumeMapper->SetInput( _vol );
00035         _volumeMapper->Update();
00036         _newvol->Update();
00037 }

wxMaracasMultipleVolumeRendererManagerData::~wxMaracasMultipleVolumeRendererManagerData (  ) 

Definition at line 40 of file wxMaracasMultipleVolumeRendererManagerData.cxx.

References _compositeFunction, _ctfun, _newvol, _tfun, _volumeMapper, _volumePlanes, and _volumeProperty.

00040                                                                                        {
00041         
00042         _tfun->Delete();
00043         _ctfun->Delete();
00044         _volumePlanes->Delete();
00045         _compositeFunction->Delete();
00046         _volumeMapper->Delete();
00047         _volumeProperty->Delete();
00048         _newvol->Delete();
00049         
00050 }


Member Function Documentation

void wxMaracasMultipleVolumeRendererManagerData::changeCompositeMIPFunction ( int  function  )  throw (char *)

Definition at line 134 of file wxMaracasMultipleVolumeRendererManagerData.cxx.

00134                                                                                                       {
00135         checkInvariant();
00136         if(function == 0){
00137                 _volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
00138         }else{
00139                 _volumeMapper->SetVolumeRayCastFunction(_MIPFunction);
00140         }
00141         
00142 }

void wxMaracasMultipleVolumeRendererManagerData::checkInvariant (  )  throw (char *)

Check if the variables are setted correctly

Definition at line 84 of file wxMaracasMultipleVolumeRendererManagerData.cxx.

References _compositeFunction, _MIPFunction, and _volumeMapper.

00084                                                                              {
00085         if(!_compositeFunction){
00086                 throw "No composite function initialized";
00087         }
00088         if(!_MIPFunction){
00089                 throw "No MIP function initialized";
00090         }
00091         if(!_volumeMapper){
00092                 throw "No volume mapper initialized";
00093         }
00094 }

vtkColorTransferFunction* wxMaracasMultipleVolumeRendererManagerData::GetColorFunction (  )  [inline]

Definition at line 77 of file wxMaracasMultipleVolumeRendererManagerData.h.

References _ctfun.

Referenced by wxMaracasMultipleVolumeRendererManager::GetColorFunction().

00077                                                     {
00078                 return _ctfun;
00079         }

Here is the caller graph for this function:

std::string wxMaracasMultipleVolumeRendererManagerData::getDataname (  ) 

Get the filanme

Definition at line 124 of file wxMaracasMultipleVolumeRendererManagerData.cxx.

References _dataname.

00124                                                                  {
00125         return _dataname;
00126 }

int wxMaracasMultipleVolumeRendererManagerData::getId (  ) 

return the id from the daat

Definition at line 111 of file wxMaracasMultipleVolumeRendererManagerData.cxx.

References _id.

Referenced by wxMaracasMultipleVolumeRendererManager::addVolume().

00111                                                      {
00112         return _id;
00113 }

Here is the caller graph for this function:

vtkProp3D * wxMaracasMultipleVolumeRendererManagerData::getProp3D (  ) 

get the prop3D

Definition at line 105 of file wxMaracasMultipleVolumeRendererManagerData.cxx.

References _newvol.

Referenced by wxMaracasMultipleVolumeRendererManager::addRemoveActor(), wxMaracasMultipleVolumeRendererManager::addVolume(), and wxMaracasRenderImageTransformation::Refresh().

00105                                                                 {
00106         return this->_newvol;
00107 }

Here is the caller graph for this function:

vtkPiecewiseFunction* wxMaracasMultipleVolumeRendererManagerData::GetTransferFunction (  )  [inline]

Definition at line 73 of file wxMaracasMultipleVolumeRendererManagerData.h.

References _tfun.

Referenced by wxMaracasMultipleVolumeRendererManager::GetTransferFunction().

00073                                                    {
00074                 return _tfun;
00075         }

Here is the caller graph for this function:

void wxMaracasMultipleVolumeRendererManagerData::setDataname ( std::string  dataname  ) 

Set the filanme

Definition at line 130 of file wxMaracasMultipleVolumeRendererManagerData.cxx.

References _dataname.

00130                                                                               {
00131         _dataname = dataname;
00132 }

void wxMaracasMultipleVolumeRendererManagerData::setId ( int  propid  ) 

set data id

Definition at line 117 of file wxMaracasMultipleVolumeRendererManagerData.cxx.

References _id.

Referenced by wxMaracasMultipleVolumeRendererManager::addVolume().

00117                                                                 {
00118         _id = propid;
00119 }

Here is the caller graph for this function:

void wxMaracasMultipleVolumeRendererManagerData::setVolumeColor ( std::vector< double > &  greylevelcolors,
std::vector< double > &  red,
std::vector< double > &  green,
std::vector< double > &  blue 
)

Set Volume Color

Definition at line 54 of file wxMaracasMultipleVolumeRendererManagerData.cxx.

References _ctfun, and _newvol.

00058 {       
00059         
00060         _ctfun->RemoveAllPoints();
00061         for(int i = 0; i < greylevelcolors.size();i++){
00062                 _ctfun->AddRGBPoint(greylevelcolors[i], red[i],green[i], blue[i]);
00063                                 //std::cout<<"wxMaracasMultipleVolumeRendererManagerData::setVolumeColor "<<greylevelcolors[i]<<" "<<red[i]<<" "<<green[i]<<" "<<blue[i]<<std::endl;
00064         }               
00065         _newvol->Update();      
00066 }

void wxMaracasMultipleVolumeRendererManagerData::setVolumeOpacity ( std::vector< double >  greylevel,
std::vector< double >  value 
)

Volume Opacity

Definition at line 71 of file wxMaracasMultipleVolumeRendererManagerData.cxx.

References _newvol, and _tfun.

00071                                                                                                                     {
00072                 
00073         _tfun->RemoveAllPoints();
00074         for(int i = 0; i < greylevel.size();i++){
00075                 _tfun->AddPoint(greylevel[i], value[i]);
00076                         //std::cout<<"wxMaracasMultipleVolumeRendererManagerData::setVolumeOpacity "<<greylevel[i]<<" "<< value[i]<<std::endl;
00077         }
00078     _newvol->Update();
00079 }

void wxMaracasMultipleVolumeRendererManagerData::Update (  ) 

Updates volume

Check if the variables are setted correctly

Definition at line 99 of file wxMaracasMultipleVolumeRendererManagerData.cxx.

References _newvol.

Referenced by wxMaracasMultipleVolumeRendererManager::Update().

00099                                                        {
00100          _newvol->Update();
00101 }

Here is the caller graph for this function:


Member Data Documentation

vtkVolumeRayCastCompositeFunction* wxMaracasMultipleVolumeRendererManagerData::_compositeFunction [private]
vtkColorTransferFunction* wxMaracasMultipleVolumeRendererManagerData::_ctfun [private]

Dataname given by the user (ex. filename)

Definition at line 91 of file wxMaracasMultipleVolumeRendererManagerData.h.

Referenced by getDataname(), setDataname(), and wxMaracasMultipleVolumeRendererManagerData().

Definition at line 99 of file wxMaracasMultipleVolumeRendererManagerData.h.

Referenced by getId(), and setId().

vtkVolumeRayCastMIPFunction* wxMaracasMultipleVolumeRendererManagerData::_MIPFunction [private]
vtkPiecewiseFunction* wxMaracasMultipleVolumeRendererManagerData::_tfun [private]

Prop 3D (data actor)

Definition at line 87 of file wxMaracasMultipleVolumeRendererManagerData.h.

Referenced by wxMaracasMultipleVolumeRendererManagerData().


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

Generated on 20 Oct 2010 for creaMaracasVisu_lib by  doxygen 1.6.1