ContourView Class Reference

#include <ContourView.h>

Collaboration diagram for ContourView:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ContourView ()
 ~ContourView ()
void DeleteContours ()
void SetWxVtkBaseView (wxVtkBaseView *wxvtkbaseview)
void Refresh ()
void CreateNewContour (vtkPolyData *contour, int type)

Private Types

enum  ContourTypes { BLUE = 0, MAGENTA, GREEN, YELLOW }

Private Member Functions

void DeleteVtkObjects ()

Private Attributes

wxVtkBaseView_wxvtkbaseview
std::vector< vtkPolyDataMapper * > contour_mapped
std::vector< vtkActor * > contour_actor

Detailed Description

Definition at line 12 of file ContourView.h.


Member Enumeration Documentation

enum ContourView::ContourTypes [private]
Enumerator:
BLUE 

Lumen Type.

MAGENTA 

Wall Type.

GREEN 

Calcification Type.

YELLOW 

Hypodense Type.

Definition at line 27 of file ContourView.h.

00028         {
00029                 BLUE = 0,         
00030                 MAGENTA,              
00031                 GREEN,     
00032                 YELLOW          
00033         };


Constructor & Destructor Documentation

ContourView::ContourView (  ) 

Definition at line 10 of file ContourView.cxx.

References _wxvtkbaseview.

00011 {
00012         _wxvtkbaseview = NULL;
00013 }

ContourView::~ContourView (  ) 

Definition at line 16 of file ContourView.cxx.

References DeleteContours().

00017 {
00018         DeleteContours();
00019 }

Here is the call graph for this function:


Member Function Documentation

void ContourView::CreateNewContour ( vtkPolyData *  contour,
int  type 
)

Definition at line 42 of file ContourView.cxx.

References _wxvtkbaseview, BLUE, contour_actor, contour_mapped, wxVtkBaseView::GetRenderer(), wxVtkBaseView::GetRenWin(), GREEN, MAGENTA, and YELLOW.

Referenced by wxQuantificationWidgetCT::RefreshAxis().

00043 {
00044         contour_mapped.push_back(vtkPolyDataMapper::New());
00045         contour_mapped.back()->ImmediateModeRenderingOn();
00046         contour_mapped.back()->ScalarVisibilityOff( );
00047         contour_mapped.back()->SetInput(contour);
00048 
00049         contour_actor.push_back(vtkActor::New());
00050         contour_actor.back()->SetMapper(contour_mapped.back());
00051         contour_actor.back()->GetProperty()->BackfaceCullingOff();
00052         
00053         switch (type)
00054         {
00055         case ContourView::BLUE :        contour_actor.back()->GetProperty()->SetDiffuseColor(0, 0, 1);
00056                                                                 break;
00057         case ContourView::MAGENTA : contour_actor.back()->GetProperty()->SetDiffuseColor(1, 0, 1);
00058                                                                 break;
00059         case ContourView::GREEN :       contour_actor.back()->GetProperty()->SetDiffuseColor(0, 1, 0);
00060                                                                 break;
00061         case ContourView::YELLOW :      contour_actor.back()->GetProperty()->SetDiffuseColor(0, 1, 1);
00062                                                                 break;
00063         default:                                        contour_actor.back()->GetProperty()->SetDiffuseColor(0, 0, 1);
00064 
00065         }
00066         contour_actor.back()->GetProperty()->SetLineWidth(2);
00067         contour_actor.back()->ApplyProperties();
00068 
00069         _wxvtkbaseview->GetRenderer()->AddActor(contour_actor.back());
00070         _wxvtkbaseview->GetRenWin()->Render();
00071 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ContourView::DeleteContours (  ) 

Definition at line 22 of file ContourView.cxx.

References contour_actor, contour_mapped, and DeleteVtkObjects().

Referenced by wxQuantificationWidgetCT::RefreshAxis(), and ~ContourView().

00023 {
00024         DeleteVtkObjects();
00025         contour_mapped.clear();
00026         contour_actor.clear();
00027 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ContourView::DeleteVtkObjects (  )  [private]

Definition at line 74 of file ContourView.cxx.

References _wxvtkbaseview, contour_actor, contour_mapped, and wxVtkBaseView::GetRenderer().

Referenced by DeleteContours().

00075 {
00076         int i,size=contour_mapped.size();
00077         for (i=0;i<size; i++){
00078                 if ( contour_mapped[i]  != NULL )       { 
00079                         contour_mapped[i]  -> Delete(); 
00080                 }
00081                 if ( contour_actor[i]   != NULL )       { 
00082                         _wxvtkbaseview->GetRenderer()->RemoveActor(contour_actor[i]);
00083                         contour_actor[i]  -> Delete(); 
00084                 }
00085                 contour_actor[i] = NULL;
00086                 contour_mapped[i] = NULL;
00087         }
00088 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ContourView::Refresh (  ) 

Definition at line 36 of file ContourView.cxx.

References _wxvtkbaseview, and wxVtkBaseView::GetRenWin().

Referenced by wxQuantificationWidgetCT::OnSliderCalcPercentageScroll(), and wxQuantificationWidgetCT::OnSliderLumenPercentageScroll().

00037 {
00038         _wxvtkbaseview->GetRenWin()->Render();
00039 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ContourView::SetWxVtkBaseView ( wxVtkBaseView wxvtkbaseview  ) 

Definition at line 30 of file ContourView.cxx.

References _wxvtkbaseview.

Referenced by wxQuantificationWidgetCT::ConfigureVTK().

00031 {
00032         _wxvtkbaseview = wxvtkbaseview;
00033 }

Here is the caller graph for this function:


Member Data Documentation

std::vector<vtkActor*> ContourView::contour_actor [private]

Definition at line 38 of file ContourView.h.

Referenced by CreateNewContour(), DeleteContours(), and DeleteVtkObjects().

std::vector<vtkPolyDataMapper*> ContourView::contour_mapped [private]

Definition at line 37 of file ContourView.h.

Referenced by CreateNewContour(), DeleteContours(), and DeleteVtkObjects().


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

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1