vtkClipping3DDataViewer Class Reference

#include <vtkClipping3DDataViewer.h>

Collaboration diagram for vtkClipping3DDataViewer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 vtkClipping3DDataViewer ()
virtual ~vtkClipping3DDataViewer ()
vtkActor * GetOutlineActor ()
vtkClipPolyData * GetTissueClipper (int id)
vtkPolyDataMapper * GetTissueMapper (int id)
vtkPlanes * GetTissuePlanes (int id)
vtkStripper * GetTissueStripper (int id)
vtkLODActor * GetMaceActor (int id)
vtkMarchingCubes * GetMCubes (int idTissue)
virtual void Refresh ()
void RefreshSurface ()
virtual void Configure ()
void Configure_Tissue ()
void Configure_Volume ()
void SetIsovalue (int idTissue, int isoValue)
double GetIsovalue (int idTissue)
vtkVolume * GetVolumeActor ()
vtkVolumeRayCastMapper * GetVolumeMapper ()
vtkPlanes * GetVolumePlanes ()
void SetVtkMPRBaseData (vtkMPRBaseData *vtkmprbasedata)
vtkMPRBaseDataGetVtkMPRBaseData ()
vtkActor * GetTissueActor (int id)
void SetVisibleTissue (int idTissue, bool visible)
bool GetVisibleTissue (int idTissue)
bool GetVisibleVolume ()
void SetVisibleVolume (bool visibleVolume)
void SetRepresentationType (int idTissue, bool representationType)
bool GetRepresentationType (int idTissue)
boxSurfaceObserverGetObserverS (int idObserverS)
boxSurfaceObserverGetObserverV ()
void ReadVolumeFunctions ()
void ReadMeshVTK (char *namefile)
std::vector< double > * GetGreyValuesTransferenceFVector ()
std::vector< double > * GetIntensityValuesTransferenceFVector ()
std::vector< double > * GetRedColorsOfColorTransferenceFVector ()
std::vector< double > * GetGreenColorsOfColorTransferenceFVector ()
std::vector< double > * GetBlueColorsOfColorTransferenceFVector ()
std::vector< double > * GetGreyValueColorsOfColorTransferenceFVector ()
void setColorTransferFunction (vtkColorTransferFunction *colortable)
vtkPiecewiseFunction * GetTransferencefunction ()
vtkColorTransferFunction * GetColorTransferenceFunction ()

Private Attributes

vtkMarchingCubes * _mCubes [VTKMPRDATA_MAXTISSUE]
vtkStripper * _tissueStripper [VTKMPRDATA_MAXTISSUE]
vtkPolyDataMapper * _tissueMapper [VTKMPRDATA_MAXTISSUE]
vtkPlanes * _tissuePlanes [VTKMPRDATA_MAXTISSUE]
vtkClipPolyData * _tissueClipper [VTKMPRDATA_MAXTISSUE]
vtkOutlineFilter * _outlineData
vtkPolyDataMapper * _mapOutline
vtkActor * _outline
vtkPiecewiseFunction * _tfun
 Volume.
vtkColorTransferFunction * _ctfun
vtkVolumeRayCastCompositeFunction * _compositeFunction
vtkPlanes * _volumePlanes
vtkVolumeRayCastMapper * _volumeMapper
vtkVolumeProperty * _volumeProperty
vtkVolume * _newvol
vtkMPRBaseData_vtkmprbasedata
bool _visibleVolume
bool _representationType [VTKMPRDATA_MAXTISSUE]
bool _visibleTissue [VTKMPRDATA_MAXTISSUE]
vtkActor * _tissue [VTKMPRDATA_MAXTISSUE]
boxSurfaceObserver_observerV
boxSurfaceObserver_observerS [VTKMPRDATA_MAXTISSUE]
std::vector< double > greyValuesTransferenceFVector
std::vector< double > intensityValuesTransferenceFVector
std::vector< double > redColorsOfColorTransferenceFVector
std::vector< double > greenColorsOfColorTransferenceFVector
std::vector< double > blueColorsOfColorTransferenceFVector
std::vector< double > greyValueColorsOfColorTransferenceFVector

Detailed Description

Definition at line 23 of file vtkClipping3DDataViewer.h.


Constructor & Destructor Documentation

vtkClipping3DDataViewer::vtkClipping3DDataViewer (  ) 

Definition at line 6 of file vtkClipping3DDataViewer.cxx.

References _representationType, _visibleTissue, _visibleVolume, and VTKMPRDATA_MAXTISSUE.

00007 {
00008         int i;
00009         for (i=0; i<VTKMPRDATA_MAXTISSUE; i++){
00010                 _visibleTissue[i]               = false;
00011                 _representationType[i]  = true;
00012         }
00013         _visibleVolume=false;
00014 }

vtkClipping3DDataViewer::~vtkClipping3DDataViewer (  )  [virtual]

Definition at line 16 of file vtkClipping3DDataViewer.cxx.

References _compositeFunction, _ctfun, _mapOutline, _mCubes, _newvol, _observerS, _observerV, _outline, _outlineData, _tfun, _tissue, _tissueClipper, _tissueMapper, _tissuePlanes, _tissueStripper, _volumeMapper, _volumePlanes, _volumeProperty, and VTKMPRDATA_MAXTISSUE.

00017 {
00018         int i;
00019         for (i=0; i< VTKMPRDATA_MAXTISSUE ; i++){
00020                 _mCubes[i]->Delete();
00021                 _tissueStripper[i]->Delete();
00022                 _tissueMapper[i]->Delete();
00023                 _tissuePlanes[i]->Delete();
00024                 _tissueClipper[i]->Delete();
00025         }
00026         _outlineData->Delete();
00027         _mapOutline->Delete();
00028         _outline->Delete();
00029         // Volume
00030         _tfun->Delete();
00031         _ctfun->Delete();
00032         _compositeFunction->Delete();
00033         _volumeMapper->Delete();
00034         _volumeProperty->Delete();
00035         _newvol->Delete();
00036         _volumePlanes->Delete();
00037 
00038         for (i=0; i< VTKMPRDATA_MAXTISSUE ; i++){
00039                 _tissue[i]-> Delete();
00040                 _observerS[i]-> Delete();
00041         }
00042         _observerV-> Delete();
00043 }


Member Function Documentation

void vtkClipping3DDataViewer::Configure (  )  [virtual]

Definition at line 330 of file vtkClipping3DDataViewer.cxx.

References _mapOutline, _outline, _outlineData, _vtkmprbasedata, Configure_Tissue(), Configure_Volume(), and vtkBaseData::GetImageData().

Referenced by wxManualRegistration3D::AddPanelControl_B(), wxManualRegistration3D::Create3DView(), wxManualTree_MPRWidget::Create3DViewContour(), wxSegmentationFM3DWidget::Create3DViewContour(), wxManualSegmentation_MPRWidget::Create3DViewContour(), wxMPRWidget::CreateMPRPanel4View(), wxMPRWidget::CreateView(), and wxMaracas_ViewerWidget::wxMaracas_ViewerWidget().

00331 {
00332         Configure_Tissue();
00333         Configure_Volume();
00334 
00335   // An outline provides context around the data.
00336   //
00337         _outlineData = vtkOutlineFilter::New();
00338     _outlineData->SetInput((vtkDataSet *) _vtkmprbasedata->GetImageData() );
00339         _mapOutline = vtkPolyDataMapper::New();
00340     _mapOutline->SetInput(_outlineData->GetOutput());
00341         _outline = vtkActor::New();
00342     _outline->SetMapper(_mapOutline);
00343     _outline->GetProperty()->SetColor(0,0,0);
00344 }

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkClipping3DDataViewer::Configure_Tissue (  ) 

Definition at line 159 of file vtkClipping3DDataViewer.cxx.

References _mCubes, _observerS, _tissue, _tissueClipper, _tissueMapper, _tissuePlanes, _tissueStripper, _vtkmprbasedata, vtkBaseData::GetImageData(), GetTissueMapper(), GetTissuePlanes(), boxSurfaceObserver::New(), boxSurfaceObserver::SetActor(), boxSurfaceObserver::SetPlanes(), and VTKMPRDATA_MAXTISSUE.

Referenced by Configure().

00160 {
00161 
00162         double range[2];
00163         int i;
00164         for (i=0; i< VTKMPRDATA_MAXTISSUE ; i++){
00165                 // Visualisation - original volume
00166                 vtkImageData *imagedata=_vtkmprbasedata->GetImageData();
00167                 imagedata->GetScalarRange( range );
00168                 _mCubes[i] = vtkMarchingCubes::New( );
00169                 _mCubes[i]->SetInput( imagedata );
00170 
00171                 _mCubes[i]->SetValue( 0, range[1]*(4+i) / 8 );
00172 //              _mCubes[i]->SetValue( 0, 1500 );
00173 
00174             _tissueStripper[i] = vtkStripper::New();
00175             _tissueStripper[i]->SetInput( _mCubes[i]->GetOutput( ) );
00176 
00177 
00178 
00179                 _tissuePlanes[i]  = vtkPlanes::New();
00180    
00181                 int x1,x2,y1,y2,z1,z2;
00182                 imagedata->GetExtent(x1,x2,y1,y2,z1,z2);
00183                 _tissuePlanes[i]->SetBounds  (x1,x2,y1,y2,z1,z2);
00184                 
00185                 _tissueClipper[i] = vtkClipPolyData::New();
00186                 _tissueClipper[i]->SetInput( _tissueStripper[i]->GetOutput() );
00187                 _tissueClipper[i]->SetClipFunction( _tissuePlanes[i] );
00188                 _tissueClipper[i]->InsideOutOn( );
00189 
00190                 _tissueMapper[i] = vtkPolyDataMapper::New( );
00191                 _tissueMapper[i]->SetInput( _tissueClipper[i]->GetOutput() );
00192                 _tissueMapper[i]->ScalarVisibilityOff( );
00193 //              _tissueMapper[i]->Update();
00194 
00195         }
00196                 
00197 
00198 
00199         // vtkActor tissue
00200         for (i=0; i< VTKMPRDATA_MAXTISSUE ; i++){
00201                 // tissue
00202                 _tissue[i] = vtkActor::New();
00203                 _tissue[i]->SetMapper( GetTissueMapper(i) );
00204                 float cr=1,cg=0.5,cb=0.5;
00205                 _tissue[i]->GetProperty()->SetDiffuseColor(cr/255, cg/255   , cb/255   );
00206                 _tissue[i]->GetProperty()->SetSpecular(.3);
00207                 _tissue[i]->GetProperty()->SetSpecularPower(20);
00208                 _tissue[i]->GetProperty()->SetOpacity(0.5);
00209                 if (i==0) _tissue[i]->GetProperty()->SetColor(0.85, 0.85   , 0.85   );
00210                 if (i==1) _tissue[i]->GetProperty()->SetColor(0, 0  ,  1  );
00211                 if (i==2) _tissue[i]->GetProperty()->SetColor(0.85, 0.20   , 0.20   );
00212                 if (i==3) _tissue[i]->GetProperty()->SetColor(0, 1   , 0   );
00213         }
00214 
00215         for (i=0; i< VTKMPRDATA_MAXTISSUE ; i++)
00216         {
00217                 _observerS[i] = boxSurfaceObserver::New();
00218                 _observerS[i]->SetPlanes( GetTissuePlanes(i) );
00219                 _observerS[i]->SetActor( _tissue[i] );
00220         }
00221 
00222 }

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkClipping3DDataViewer::Configure_Volume (  ) 

Definition at line 226 of file vtkClipping3DDataViewer.cxx.

References _compositeFunction, _ctfun, _newvol, _observerV, _tfun, _volumeMapper, _volumePlanes, _volumeProperty, _vtkmprbasedata, blueColorsOfColorTransferenceFVector, vtkBaseData::GetImageData(), GetVtkMPRBaseData(), greenColorsOfColorTransferenceFVector, greyValueColorsOfColorTransferenceFVector, greyValuesTransferenceFVector, intensityValuesTransferenceFVector, boxSurfaceObserver::New(), redColorsOfColorTransferenceFVector, boxSurfaceObserver::SetActor(), boxSurfaceObserver::SetPlanes(), and boxSurfaceObserver::SetvtkVolumeRayCastMapper().

Referenced by Configure().

00227 {
00228   // Volume
00229 
00230   _tfun = vtkPiecewiseFunction::New();
00231   _ctfun = vtkColorTransferFunction::New();
00232 
00233         double range[2];
00234         this->_vtkmprbasedata->GetImageData()->GetScalarRange(range);
00235         double max = range[1];
00236 
00237         /*
00238         adding the poinst of the transference function
00239         */
00240         //X
00241         greyValuesTransferenceFVector.push_back(max * 0/2);  // JPR ?? 0/2
00242         greyValuesTransferenceFVector.push_back(max * 1/2);  // JPR ?? division entiere?
00243         greyValuesTransferenceFVector.push_back(max * 2/2);
00244         //Y
00245         intensityValuesTransferenceFVector.push_back(0.0);
00246         intensityValuesTransferenceFVector.push_back(1.0);
00247         intensityValuesTransferenceFVector.push_back(1.0);
00248 
00249         _tfun->AddPoint(max * 0/2 , 0.0);
00250         _tfun->AddPoint(max * 1/2 , 1.0);
00251         _tfun->AddPoint(max * 2/2 , 1.0);
00252 
00253         /*
00254                 Adding the colors to the vectors        
00255         */
00256         //RED
00257         redColorsOfColorTransferenceFVector.push_back(0.0);
00258         redColorsOfColorTransferenceFVector.push_back(1.0);
00259         redColorsOfColorTransferenceFVector.push_back(0.0);
00260         redColorsOfColorTransferenceFVector.push_back(0.0);
00261         redColorsOfColorTransferenceFVector.push_back(0.0);
00262 
00263         //GREEN
00264         greenColorsOfColorTransferenceFVector.push_back(0.0);
00265         greenColorsOfColorTransferenceFVector.push_back(0.0);
00266         greenColorsOfColorTransferenceFVector.push_back(0.0);
00267         greenColorsOfColorTransferenceFVector.push_back(1.0);
00268         greenColorsOfColorTransferenceFVector.push_back(0.2);
00269         
00270         //BLUE
00271         blueColorsOfColorTransferenceFVector.push_back(0.0);
00272         blueColorsOfColorTransferenceFVector.push_back(0.0);
00273         blueColorsOfColorTransferenceFVector.push_back(1.0);
00274         blueColorsOfColorTransferenceFVector.push_back(0.0);
00275         blueColorsOfColorTransferenceFVector.push_back(0.0);
00276         //GREY VALUE    
00277         greyValueColorsOfColorTransferenceFVector.push_back(max*0/4);
00278         greyValueColorsOfColorTransferenceFVector.push_back(max*1/4);
00279         greyValueColorsOfColorTransferenceFVector.push_back(max*2/4);
00280         greyValueColorsOfColorTransferenceFVector.push_back(max*3/4);
00281         greyValueColorsOfColorTransferenceFVector.push_back(max*4/4);
00282 
00283         _ctfun->AddRGBPoint( max*0/4 , 0.0, 0.0, 0.0);
00284         _ctfun->AddRGBPoint( max*1/4 , 1.0, 0.0, 0.0);
00285         _ctfun->AddRGBPoint( max*2/4 , 0.0, 0.0, 1.0);
00286         _ctfun->AddRGBPoint( max*3/4 , 0.0, 1.0, 0.0);
00287         _ctfun->AddRGBPoint( max*4/4 , 0.0, 0.2, 0.0);
00288 
00289   _volumePlanes  = vtkPlanes::New();
00290 //      int x1,x2,y1,y2,z1,z2;
00291 //      vtkImageData *imagedata=_vtkmprbasedata->GetImageData();
00292 //      imagedata->GetExtent(x1,x2,y1,y2,z1,z2);
00293 //      _volumePlanes->SetBounds(x1,x2,y1,y2,z1,z2);
00294 
00295   _compositeFunction = vtkVolumeRayCastCompositeFunction::New();
00296 
00297   _volumeMapper = vtkVolumeRayCastMapper::New();
00298         _volumeMapper->SetInput( this->GetVtkMPRBaseData()->GetImageData() );
00299         _volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
00300         _volumeMapper->SetClippingPlanes( _volumePlanes );
00301         _volumeMapper->AutoAdjustSampleDistancesOn();
00302 
00303   _volumeProperty = vtkVolumeProperty::New();
00304         _volumeProperty->SetColor(_ctfun);
00305         _volumeProperty->SetScalarOpacity( _tfun );
00306 // EED 31/03/2008
00307         _volumeProperty->SetInterpolationTypeToLinear();
00308         _volumeProperty->ShadeOn();
00309         _volumeProperty->DisableGradientOpacityOn();
00310 
00311 //      _volumeProperty->SetInterpolationTypeToNearest();
00312 //      _volumeProperty->ShadeOff();
00313 //      _volumeProperty->SetAmbient(0.3);
00314 //      _volumeProperty->SetDiffuse(0.1);
00315 //      _volumeProperty->SetSpecular(0.8);
00316 //      _volumeProperty->DisableGradientOpacityOn();
00317 
00318   _newvol = vtkVolume::New();
00319         _newvol->SetMapper(_volumeMapper );
00320         _newvol->SetProperty(_volumeProperty );
00321 
00322   _observerV = boxSurfaceObserver::New();
00323         _observerV->SetPlanes( _volumePlanes );
00324         _observerV->SetActor( _newvol );
00325         _observerV->SetvtkVolumeRayCastMapper( _volumeMapper );
00326 }

Here is the call graph for this function:

Here is the caller graph for this function:

std::vector< double > * vtkClipping3DDataViewer::GetBlueColorsOfColorTransferenceFVector (  ) 

Definition at line 402 of file vtkClipping3DDataViewer.cxx.

References blueColorsOfColorTransferenceFVector.

Referenced by wxVtkClipping3DViewVolCntrlPanel::OnBtnVolumeFunctions(), and wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions().

00403 {       
00404         return &blueColorsOfColorTransferenceFVector;
00405 }

Here is the caller graph for this function:

vtkColorTransferFunction * vtkClipping3DDataViewer::GetColorTransferenceFunction (  ) 

Definition at line 421 of file vtkClipping3DDataViewer.cxx.

References _ctfun.

Referenced by wxVtkClipping3DViewVolCntrlPanel::OnBtnVolumeFunctions(), and wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions().

00422 {
00423         return this->_ctfun;
00424 }

Here is the caller graph for this function:

std::vector< double > * vtkClipping3DDataViewer::GetGreenColorsOfColorTransferenceFVector (  ) 

Definition at line 397 of file vtkClipping3DDataViewer.cxx.

References greenColorsOfColorTransferenceFVector.

Referenced by wxVtkClipping3DViewVolCntrlPanel::OnBtnVolumeFunctions(), and wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions().

00398 {
00399         return &greenColorsOfColorTransferenceFVector;
00400 }

Here is the caller graph for this function:

std::vector< double > * vtkClipping3DDataViewer::GetGreyValueColorsOfColorTransferenceFVector (  ) 
std::vector< double > * vtkClipping3DDataViewer::GetGreyValuesTransferenceFVector (  ) 

Definition at line 382 of file vtkClipping3DDataViewer.cxx.

References greyValuesTransferenceFVector.

Referenced by wxVtkClipping3DViewVolCntrlPanel::OnBtnVolumeFunctions(), and wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions().

00383 {
00384         return &greyValuesTransferenceFVector;
00385 }

Here is the caller graph for this function:

std::vector< double > * vtkClipping3DDataViewer::GetIntensityValuesTransferenceFVector (  ) 

Definition at line 387 of file vtkClipping3DDataViewer.cxx.

References intensityValuesTransferenceFVector.

Referenced by wxVtkClipping3DViewVolCntrlPanel::OnBtnVolumeFunctions(), and wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions().

00388 {
00389         return &intensityValuesTransferenceFVector;
00390 }

Here is the caller graph for this function:

double vtkClipping3DDataViewer::GetIsovalue ( int  idTissue  ) 

Definition at line 353 of file vtkClipping3DDataViewer.cxx.

References _mCubes.

Referenced by wxVtkClipping3DViewCntrlPanel::OnSurface(), RefreshSurface(), and wxVtkClipping3DViewCntrlPanel::wxVtkClipping3DViewCntrlPanel().

00354 {
00355         return _mCubes[idTissue]->GetValue(0);
00356 }

Here is the caller graph for this function:

vtkLODActor* vtkClipping3DDataViewer::GetMaceActor ( int  id  ) 
vtkMarchingCubes * vtkClipping3DDataViewer::GetMCubes ( int  idTissue  ) 

Definition at line 373 of file vtkClipping3DDataViewer.cxx.

References _mCubes.

Referenced by vtkInteractorStyle3DView::SelectMarchibCubePoint().

00374 {
00375         return _mCubes[idTissue];
00376 }

Here is the caller graph for this function:

boxSurfaceObserver * vtkClipping3DDataViewer::GetObserverS ( int  idObserverS  ) 

Definition at line 136 of file vtkClipping3DDataViewer.cxx.

References _observerS.

Referenced by wxVtkClipping3DView::Configure().

00137 {
00138         return _observerS[idObserverS];
00139 }

Here is the caller graph for this function:

boxSurfaceObserver * vtkClipping3DDataViewer::GetObserverV (  ) 

Definition at line 141 of file vtkClipping3DDataViewer.cxx.

References _observerV.

Referenced by wxVtkClipping3DView::Configure().

00142 {
00143         return _observerV;
00144 }

Here is the caller graph for this function:

vtkActor * vtkClipping3DDataViewer::GetOutlineActor (  ) 

Definition at line 45 of file vtkClipping3DDataViewer.cxx.

References _outline.

Referenced by wxVtkClipping3DView::Configure().

00046 {
00047         return _outline;
00048 }

Here is the caller graph for this function:

std::vector< double > * vtkClipping3DDataViewer::GetRedColorsOfColorTransferenceFVector (  ) 

Definition at line 392 of file vtkClipping3DDataViewer.cxx.

References redColorsOfColorTransferenceFVector.

Referenced by wxVtkClipping3DViewVolCntrlPanel::OnBtnVolumeFunctions(), and wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions().

00393 {
00394         return &redColorsOfColorTransferenceFVector;
00395 }

Here is the caller graph for this function:

bool vtkClipping3DDataViewer::GetRepresentationType ( int  idTissue  ) 

Definition at line 125 of file vtkClipping3DDataViewer.cxx.

References _representationType.

Referenced by wxVtkClipping3DViewCntrlPanel::OnSurface().

00126 {
00127         return _representationType[idTissue];
00128 }

Here is the caller graph for this function:

vtkActor * vtkClipping3DDataViewer::GetTissueActor ( int  id  ) 
vtkClipPolyData * vtkClipping3DDataViewer::GetTissueClipper ( int  id  ) 

Definition at line 50 of file vtkClipping3DDataViewer.cxx.

References _tissueClipper.

Referenced by wxVtkClipping3DViewCntrlPanel::OnBtnCreateFileSTL().

00051 {
00052         return this->_tissueClipper[id];
00053 }

Here is the caller graph for this function:

vtkPolyDataMapper * vtkClipping3DDataViewer::GetTissueMapper ( int  id  ) 

Definition at line 55 of file vtkClipping3DDataViewer.cxx.

References _tissueMapper.

Referenced by Configure_Tissue().

00056 {
00057         return _tissueMapper[id];
00058 }

Here is the caller graph for this function:

vtkPlanes * vtkClipping3DDataViewer::GetTissuePlanes ( int  id  ) 

Definition at line 60 of file vtkClipping3DDataViewer.cxx.

References _tissuePlanes.

Referenced by Configure_Tissue().

00061 {
00062         return _tissuePlanes[id];
00063 }

Here is the caller graph for this function:

vtkStripper * vtkClipping3DDataViewer::GetTissueStripper ( int  id  ) 

Definition at line 65 of file vtkClipping3DDataViewer.cxx.

References _tissueStripper.

Referenced by wxVtkClipping3DView::Configure().

00066 {
00067         return _tissueStripper[id];
00068 }

Here is the caller graph for this function:

vtkPiecewiseFunction * vtkClipping3DDataViewer::GetTransferencefunction (  ) 

Definition at line 416 of file vtkClipping3DDataViewer.cxx.

References _tfun.

Referenced by wxVtkClipping3DViewVolCntrlPanel::OnBtnVolumeFunctions(), and wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions().

00417 {
00418         return this->_tfun;
00419 }

Here is the caller graph for this function:

bool vtkClipping3DDataViewer::GetVisibleTissue ( int  idTissue  ) 

Definition at line 116 of file vtkClipping3DDataViewer.cxx.

References _visibleTissue.

Referenced by wxVtkClipping3DViewCntrlPanel::OnSurface(), and wxVtkClipping3DView::VisibleActor().

00116                                                           {
00117         return _visibleTissue[idTissue];
00118 }

Here is the caller graph for this function:

bool vtkClipping3DDataViewer::GetVisibleVolume (  ) 

Definition at line 147 of file vtkClipping3DDataViewer.cxx.

References _visibleVolume.

Referenced by wxVtkClipping3DView::VisibleVolumeActor().

00148 {
00149         return _visibleVolume;
00150 }

Here is the caller graph for this function:

vtkVolume * vtkClipping3DDataViewer::GetVolumeActor (  ) 

Definition at line 358 of file vtkClipping3DDataViewer.cxx.

References _newvol.

Referenced by wxVtkClipping3DView::VisibleVolumeActor().

00359 {
00360    return _newvol;
00361 }

Here is the caller graph for this function:

vtkVolumeRayCastMapper * vtkClipping3DDataViewer::GetVolumeMapper (  ) 

Definition at line 363 of file vtkClipping3DDataViewer.cxx.

References _volumeMapper.

00363                                                                 {
00364         return _volumeMapper;
00365 }

vtkPlanes * vtkClipping3DDataViewer::GetVolumePlanes (  ) 

Definition at line 367 of file vtkClipping3DDataViewer.cxx.

References _volumePlanes.

00368 {
00369         return _volumePlanes;
00370 }

vtkMPRBaseData * vtkClipping3DDataViewer::GetVtkMPRBaseData (  ) 
void vtkClipping3DDataViewer::ReadMeshVTK ( char *  namefile  ) 

Definition at line 617 of file vtkClipping3DDataViewer.cxx.

References _tissueStripper.

Referenced by wxVtkClipping3DViewCntrlPanel::OnBtnMeshVTKLoad().

00618 {
00619         vtkDataSetReader *reader = vtkDataSetReader::New();
00620         reader->SetFileName(namefile);
00621         reader->Update();
00622         _tissueStripper[3]->SetInput( reader->GetPolyDataOutput()  );
00623 }

Here is the caller graph for this function:

void vtkClipping3DDataViewer::ReadVolumeFunctions (  ) 

Definition at line 428 of file vtkClipping3DDataViewer.cxx.

00429 {
00430 /*
00431         int i=0,xi,yi,r,g,b,gValue;
00432         vtkImageData *imagedata = this->_vtkmprbasedata->GetImageData();
00433         
00434         HistogramDialog* hDlg=new HistogramDialog(NULL,_T("Histogram Dialog"),imagedata);
00435         // 
00436         // put in a method
00437         //
00438         int tfSize=this->greyValuesTransferenceFVector.size();
00439                 if(tfSize>0)
00440                 {
00441                         int i=0,y;
00442                         hDlg->erasePointsTransferenceFunction();
00443                         while(i<tfSize)
00444                         {
00445                                 double g=greyValuesTransferenceFVector[i];
00446                                 double in=intensityValuesTransferenceFVector[i];
00447                                 hDlg->addPointToTransferenceFunction(g,in*100);
00448                                 i++;
00449                         }
00450                         
00451                 }
00452 
00453         int ctfSize=this->redColorsOfColorTransferenceFVector.size();
00454         if(ctfSize>0)
00455         {
00456                 int i=0,y;
00457                         while(i<ctfSize)
00458                         {
00459                                 double gr=greyValueColorsOfColorTransferenceFVector[i];
00460                                 double r=redColorsOfColorTransferenceFVector[i];
00461                                 double g=greenColorsOfColorTransferenceFVector[i];
00462                                 double b=blueColorsOfColorTransferenceFVector[i];
00463                                 hDlg->addColorPoint(gr,r*255,g*255,b*255);
00464                                 i++;
00465                         }
00466         }
00467         //If it is smooth activate next line
00468         //hDlg->updatePlotter();
00469         //setting variables if the user wants to do refresh
00470         hDlg->setCTF(_ctfun);
00471         hDlg->setTF(_tfun);
00472         
00473         //
00474         // when the user had changed the transference Function
00475         //
00476         if(hDlg->ShowModal()== wxID_OK )
00477         {       
00478                         // -- vtkPiecewiseFunction --
00479                         this->_tfun->RemoveAllPoints();
00480                         greyValuesTransferenceFVector.clear();
00481                         intensityValuesTransferenceFVector.clear();
00482                 
00483                         int nTFPoints=hDlg->getSizeTransferenceFunction();
00484                         i=0;
00485                         while(i<nTFPoints)
00486                         {
00487                                 hDlg->getTransferenceFunctionPoint(i,xi,yi);
00488                                 this->_tfun->AddPoint( xi , yi/100.0 );
00489                                 greyValuesTransferenceFVector.push_back(xi);
00490                                 intensityValuesTransferenceFVector.push_back(yi/100.0);
00491                                 i++;
00492                         }       
00493                         // -- vtkColorTransferFunction  --
00494                         this->_ctfun->RemoveAllPoints ();
00495                         //clean colors
00496                         redColorsOfColorTransferenceFVector.clear();
00497                         greenColorsOfColorTransferenceFVector.clear();
00498                         blueColorsOfColorTransferenceFVector.clear();
00499                         greyValueColorsOfColorTransferenceFVector.clear();
00500 
00501                         int nCTFpoints=hDlg->getSizeBarColor();
00502                         i=0;    
00503                         while(i<nCTFpoints)
00504                         {
00505                                 hDlg->getDataBarColorPoint(i,xi,r,g,b);
00506                                 this->_ctfun->AddRGBPoint(xi,r/255.0,g/255.0,b/255.0 );
00507                                 redColorsOfColorTransferenceFVector.push_back(r/255.0);
00508                                 greenColorsOfColorTransferenceFVector.push_back(g/255.0);
00509                                 blueColorsOfColorTransferenceFVector.push_back(b/255.0);
00510                                 greyValueColorsOfColorTransferenceFVector.push_back(xi);
00511                                 i++;
00512                         }
00513                         
00514                         this->_volumeMapper->Update();
00515                         this->_newvol->Update();
00516         }
00517         
00518         else
00519         {
00520                 
00521                 if(hDlg->getRefreshed())
00522                 {
00523                         int i=0,size;
00524                         //--Transference Function----
00525                         this->_tfun->RemoveAllPoints();
00526                         i=0;
00527                         size=greyValuesTransferenceFVector.size();
00528                         for(i=0;i<size;i++)
00529                         {
00530                                 double grey1=greyValuesTransferenceFVector[i];
00531                                 double  in2=intensityValuesTransferenceFVector[i];
00532                                 this->_tfun->AddPoint( grey1 , in2 );
00533                         }
00534                         
00535                         // -- vtkColorTransferFunction  --
00536                         _ctfun->RemoveAllPoints ();
00537                         
00538                         i=0;
00539                         size=greyValueColorsOfColorTransferenceFVector.size();          
00540                         for(i=0;i<size;i++)
00541                         {
00542                                 double grey2=(greyValueColorsOfColorTransferenceFVector)[i];
00543                                 double red =(redColorsOfColorTransferenceFVector)[i];
00544                                 double green =(greenColorsOfColorTransferenceFVector)[i];
00545                                 double blue = (blueColorsOfColorTransferenceFVector)[i];
00546                                 _ctfun->AddRGBPoint(grey2,red,green,blue);
00547                         }
00548                         this->_volumeMapper->Update();
00549                         this->_newvol->Update();
00550                  }
00551                  
00552         }
00553         hDlg->Destroy();
00554 */
00555 }

void vtkClipping3DDataViewer::Refresh (  )  [virtual]

Definition at line 70 of file vtkClipping3DDataViewer.cxx.

Referenced by wxVtkClipping3DView::Refresh().

00071 {
00072 //      _volumeMapper->SetClippingPlanes(_volumePlanes);
00073 
00074 //      this->_volumeMapper->Update();
00075 //      this->_newvol->Update();
00076 
00077 //      _newvol->VisibilityOn();
00078 
00079         
00080 // _volumeMapper = vtkVolumeRayCastMapper::New();
00081 //      _volumeMapper->SetInput( this->GetVtkMPRBaseData()->GetImageData() );
00082 //      _volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
00083 //      _volumeMapper->SetClippingPlanes( _volumePlanes );
00084 //      _newvol->SetMapper(_volumeMapper );
00085 
00086 
00087 }

Here is the caller graph for this function:

void vtkClipping3DDataViewer::RefreshSurface (  ) 

Definition at line 89 of file vtkClipping3DDataViewer.cxx.

References GetIsovalue(), SetIsovalue(), and VTKMPRDATA_MAXTISSUE.

Referenced by wxPanelCuttingImageData::OnExtract().

00090 {
00091         int i;
00092         for (i=0; i< VTKMPRDATA_MAXTISSUE ; i++)
00093         {
00094                 SetIsovalue(i, (int) (GetIsovalue(i)+1) );
00095 //              this->GetMCubes(i)->Update();
00096         }
00097 }

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkClipping3DDataViewer::setColorTransferFunction ( vtkColorTransferFunction *  colortable  ) 

Definition at line 625 of file vtkClipping3DDataViewer.cxx.

References _volumeProperty.

00625                                                                                           {
00626         
00627         _volumeProperty->SetColor(colortable);
00628         
00629 }

void vtkClipping3DDataViewer::SetIsovalue ( int  idTissue,
int  isoValue 
)

Definition at line 348 of file vtkClipping3DDataViewer.cxx.

References _mCubes.

Referenced by wxVtkClipping3DViewCntrlPanel::OnIsoValue(), and RefreshSurface().

00349 {
00350         _mCubes[idTissue]->SetValue(0, isoValue);
00351 }

Here is the caller graph for this function:

void vtkClipping3DDataViewer::SetRepresentationType ( int  idTissue,
bool  representationType 
)

Definition at line 120 of file vtkClipping3DDataViewer.cxx.

References _representationType.

Referenced by wxVtkClipping3DView::SetRepSurfaceWireFrame().

00121 {
00122         _representationType[idTissue]=representationType;
00123 }

Here is the caller graph for this function:

void vtkClipping3DDataViewer::SetVisibleTissue ( int  idTissue,
bool  visible 
)

Definition at line 111 of file vtkClipping3DDataViewer.cxx.

References _visibleTissue.

Referenced by wxVtkClipping3DView::VisibleActor().

00112 {
00113         _visibleTissue[idTissue]=visible;
00114 }

Here is the caller graph for this function:

void vtkClipping3DDataViewer::SetVisibleVolume ( bool  visibleVolume  ) 

Definition at line 152 of file vtkClipping3DDataViewer.cxx.

References _visibleVolume.

Referenced by wxVtkClipping3DView::VisibleVolumeActor().

00153 {
00154         _visibleVolume = visiblevolume;
00155 }

Here is the caller graph for this function:

void vtkClipping3DDataViewer::SetVtkMPRBaseData ( vtkMPRBaseData vtkmprbasedata  ) 

Member Data Documentation

vtkVolumeRayCastCompositeFunction* vtkClipping3DDataViewer::_compositeFunction [private]

Definition at line 114 of file vtkClipping3DDataViewer.h.

Referenced by Configure_Volume(), and ~vtkClipping3DDataViewer().

vtkColorTransferFunction* vtkClipping3DDataViewer::_ctfun [private]
vtkPolyDataMapper* vtkClipping3DDataViewer::_mapOutline [private]

Definition at line 108 of file vtkClipping3DDataViewer.h.

Referenced by Configure(), and ~vtkClipping3DDataViewer().

vtkMarchingCubes* vtkClipping3DDataViewer::_mCubes[VTKMPRDATA_MAXTISSUE] [private]
vtkVolume* vtkClipping3DDataViewer::_newvol [private]
boxSurfaceObserver* vtkClipping3DDataViewer::_observerS[VTKMPRDATA_MAXTISSUE] [private]
vtkActor* vtkClipping3DDataViewer::_outline [private]

Definition at line 109 of file vtkClipping3DDataViewer.h.

Referenced by Configure(), GetOutlineActor(), and ~vtkClipping3DDataViewer().

vtkOutlineFilter* vtkClipping3DDataViewer::_outlineData [private]

Definition at line 107 of file vtkClipping3DDataViewer.h.

Referenced by Configure(), and ~vtkClipping3DDataViewer().

bool vtkClipping3DDataViewer::_representationType[VTKMPRDATA_MAXTISSUE] [private]
vtkPiecewiseFunction* vtkClipping3DDataViewer::_tfun [private]
vtkActor* vtkClipping3DDataViewer::_tissue[VTKMPRDATA_MAXTISSUE] [private]
vtkClipPolyData* vtkClipping3DDataViewer::_tissueClipper[VTKMPRDATA_MAXTISSUE] [private]
vtkPolyDataMapper* vtkClipping3DDataViewer::_tissueMapper[VTKMPRDATA_MAXTISSUE] [private]
vtkPlanes* vtkClipping3DDataViewer::_tissuePlanes[VTKMPRDATA_MAXTISSUE] [private]
vtkStripper* vtkClipping3DDataViewer::_tissueStripper[VTKMPRDATA_MAXTISSUE] [private]
bool vtkClipping3DDataViewer::_visibleTissue[VTKMPRDATA_MAXTISSUE] [private]
vtkVolumeRayCastMapper* vtkClipping3DDataViewer::_volumeMapper [private]
vtkVolumeProperty* vtkClipping3DDataViewer::_volumeProperty [private]

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

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1