${PROJECT_SOURCE_DIR}/lib/Kernel/VTKObjects/SurfaceRenderer
${PROJECT_SOURCE_DIR}/lib/Kernel/VTKObjects/ViewerWidgets
${PROJECT_SOURCE_DIR}/lib/Kernel/VTKObjects/VolumeRenderer
-
-
)
// Widget interface
wxButton *btnSetPositionPoint = new wxButton( panel, -1, _T("Set nearest point"));
txtNrPoints = new wxStaticText(panel,-1, _T(" "));
-
+
//NTU: Sliders for opacity and radio change
wxStaticText* txOpacity = new wxStaticText(this, -1, wxString(_T(" Points Opacity ")));
sdrOpacity = new wxSlider(this, -1, 0, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_LABELS);
Connect(btnSetPositionPoint->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WidgetShowNPoints::OnSetPoint);
Connect(sdrOpacity->GetId() , wxEVT_COMMAND_SLIDER_UPDATED , (wxObjectEventFunction) &WidgetShowNPoints::UpdatePoints);
Connect(sdrRadio->GetId() , wxEVT_COMMAND_SLIDER_UPDATED , (wxObjectEventFunction) &WidgetShowNPoints::UpdatePoints);
-
+
sizer1->Add(btnSetPositionPoint);
sizer1->Add(txtNrPoints);
sizer1->Add(txOpacity);
sizer1->Add(sdrRadio,1,wxGROW );
sizer = sizer1;
}
-
+
if (sizer!=NULL)
{
panel->SetSizer(sizer);
vtkActor *sphereActor = vtkActor::New();
sphereActor->SetMapper(sphereMapper);
sphereActor->SetOrigin(0, 0, 0);
-
-
+
/*EED Borrame
double spc[3];
if(mimage==NULL){
sphereActor->GetProperty()->SetColor( mcolour[0] , mcolour[1] , mcolour[2] );
sphereActor->GetProperty()->SetOpacity( mopacity );
*/
-
+
lstActorsSphere.push_back(sphereActor);
if(renderer==NULL){
wxMessageDialog dialog(this, _T("Renderer Not Set"),_T("Renderer Not Set"),wxICON_ERROR);
}
}
-
//------------------------------------------------------------------------
void WidgetShowNPoints::OnRenamePoint(wxCommandEvent& event)
{
void ShowNPoints::CreateWidget(wxWindow* parent)
{
mwxwidget = new WidgetShowNPoints( parent, this);
- bbSetOutputWidget( mwxwidget );
+ bbSetOutputWidget( mwxwidget );
}
void ShowNPoints::bbUserSetDefaultValues()
{
- mwxwidget = NULL;
+ mwxwidget = NULL;
bbSetInputRadio(1);
bbSetInputOpacity(1);
void CreateWidget(wxWindow*);
private:
- WidgetShowNPoints *mwxwidget;
+ WidgetShowNPoints *mwxwidget;
};
BBTK_BEGIN_DESCRIBE_BLACK_BOX(ShowNPoints,bbtk::WxBlackBox);
wxWidgetSliderMinMax :: wxWidgetSliderMinMax(SliderMinMax *bbParent,mBarRange * modelBarRange)
:wxEvtHandler()
{
- modBarRange = modelBarRange;
- mbbtkSliderMinMax = bbParent;
+ modBarRange = modelBarRange;
+ mbbtkSliderMinMax = bbParent;
Connect(modBarRange->GetId(),wxEVT_TSBAR,(wxObjectEventFunction) (wxCommandEventFunction) &wxWidgetSliderMinMax::onBarrange );
// Connect(modBarRange->GetId(),98765,(wxObjectEventFunction) (wxCommandEventFunction) &wxWidgetSliderMinMax::onActualChange_Bar );
Connect(modBarRange->GetId(),wxEVT_TSBAR_ACTUAL,(wxObjectEventFunction) (wxCommandEventFunction) &wxWidgetSliderMinMax::onActualChange_Bar );
wxWidgetSliderMinMax :: ~wxWidgetSliderMinMax()
{
}
-
+
void wxWidgetSliderMinMax::PushEventHandler()
{
modBarRange->PushEventHandler(this);
}
-
+
//--------------------------------------------------------------------------------------------------------------------------------
// Min-Max Barrange received events
//--------------------------------------------------------------------------------------------------------------------------------
void wxWidgetSliderMinMax :: onStartChange_Bar(wxCommandEvent& event)
{
- mbbtkSliderMinMax->bbSetOutputOutStart(modBarRange->GetStart());
+ mbbtkSliderMinMax->bbSetOutputOutStart(modBarRange->GetStart());
mbbtkSliderMinMax->bbSetInputInMinShow(modBarRange->GetStart());
mbbtkSliderMinMax->bbSignalOutputModification(std::string("OutStart"));
}
mwxwidget -> setIfWithActualDrawed(bbGetInputShowActual());
// mwxwidget -> SetStart(bbGetInputInMinShow());
// mwxwidget -> SetEnd(bbGetInputInMaxShow());
-
-
+
+
wxWidgetSliderMinMax *eventHandler = new wxWidgetSliderMinMax(this, mwxwidget);
eventHandler->PushEventHandler();
-
+
bbtkDebugDecTab("Core",9);
bbSetOutputWidget( mwxwidget );
void onEndChange_Bar(wxCommandEvent& event);
void onSelectionEnd(wxCommandEvent& event);
void onMovedBar(wxCommandEvent& event);
-
void PushEventHandler();
#include "volumerendererdata.h"
#include "vtkObjectFactory.h"
-vtkCxxRevisionMacro(VolumeRendererData, "$Revision: 1.5 $");
+vtkCxxRevisionMacro(VolumeRendererData, "$Revision: 1.6 $");
vtkStandardNewMacro(VolumeRendererData);
VolumeRendererData::VolumeRendererData()
}else{
Renderer->RemoveActor(VolRendData->getProp3D());
// VolRendData->Delete();
- // VolRendData = 0;
+ // VolRendData = 0;
}
}
void VolumeRendererData::OpacityChanged(vector<double> greyvalues, vector<double> values){
//invariant();
- if(VolRendData==NULL)
+ if(VolRendData==NULL)
{
VolRendData = new VolumeRendererManagerData(ImageData, true);
vtkLookupTable* LookUpTable;
vtkRenderWindowInteractor* Interactor;
-
-
-
-
private:
void invariant();
${QT_LIBRARIES}
QVTK
- GUIQtVolumeRenderer
+ GUIQtVolumeRenderer
GUIQtSurfaceRenderer
KernelViewerWidgets
{
setupUi(this);
-
this->m_VolumeRender->SetRenderer(this->getRenderer());
this->m_VolumeRender->SetInteractor(this->_qtvtkviewer->GetRenderWindow()->GetInteractor());
-
this->m_SurfaceRender->setRenderer(this->getRenderer());
this->m_SurfaceRender->setInteractor(this->_qtvtkviewer->GetRenderWindow()->GetInteractor());
}
this->_qtvtkviewer->setImage(img);
this->m_VolumeRender->SetImageData(img);
this->m_SurfaceRender->SetImageData(img);
-
}
void QtVTKViewerWidget::SetLookupTable(vtkLookupTable *lookuptable){
this->_qtvtkviewer->SetLookupTable(lookuptable);
this->m_VolumeRender->SetLookUpTable(lookuptable);
-
}
void QtVTKViewerWidget::on_checkBoxShowPlanes_clicked(){
ADD_SUBDIRECTORY(SurfaceRenderer)
ADD_SUBDIRECTORY(VolumeRenderer)
-
_MIPFunction = 0;
_boxWidgetS1 = 0;
-
-
/* EED9Juin2011
if(usegpu && _vol->GetDataDimension() > 2){
_volumeMappergpu = vtkGPUVolumeRayCastMapper::New();
# Sets the settings for macro CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE
SET(${LIBRARY_NAME}_INSTALL_FOLDER ${LIBRARY_NAME})
- SET(${LIBRARY_NAME}_LIBRARIES ${LIBRARY_NAME}
+ SET(${LIBRARY_NAME}_LIBRARIES ${LIBRARY_NAME}
BaseVolumeRenderer
BaseSurfaceRenderer
GUIWxSurfaceRenderer
return guideLineColor;
}
-
void mBarRange ::onLeftClicDown(wxMouseEvent& event )
{
acceptedClick = true;
//End of the rectangule
int _end;
//Logical Max
- double _max;
+ double _max;
//Logical Min
- double _min;
+ double _min;
//Initial point when moving the rectangule bar according to bar reference
int _initialPoint;
/*
_visibleVolume = visiblevolume;
}
-
-
bool vtkClipping3DDataViewer::GetVisibleVolumeBox()
{
return _visibleVolumeBox;
_visibleVolumeBox = visibleBox;
}
-
-
//-------------------------------------------------------------------
void vtkClipping3DDataViewer::Configure_Tissue()
{
bool _visibleVolumeBox;
-
bool _representationType[VTKMPRDATA_MAXTISSUE];
bool _visibleTissue[VTKMPRDATA_MAXTISSUE];
vtkActor *_tissue[VTKMPRDATA_MAXTISSUE];
// between the planes is actually rendered.
_wxvtk3Dbaseview->GetRenderer()->ResetCameraClippingRange();
-
-
-
//cout<<"JPRG::wxVtkClipping3DView::SetVtkClipping3DDataViewer::GetRenderer()::"<<this->GetWxvtk3Dbaseview()->GetRenderer()<<endl;
//cout<<"JPRG::wxVtkClipping3DView::SetVtkClipping3DDataViewer::GetWxVTKRenderWindowInteractor()::"<<this->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()<<endl;
//---------------------------------
//_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadVolumeFunctions();
-
//test
/*
volumeMapper->Update();
newvol->Update();
-
-
*/
} else {
if(hDlg->getRefreshed())
//---------------------------------
//_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadVolumeFunctions();
-
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
_wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-
_wxvtkclipping3Dview->Refresh();
/*
}
//destroy the dialog
-
hDlg->Destroy();
}
void wxVtkClipping3DViewVolCntrlPanel::OnInterpolationActive(wxCommandEvent& event){
-
-
_wxvtkclipping3Dview->SetInterpolation(event.IsChecked());
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
}
void wxVtkClipping3DViewVolCntrlPanel::OnShadeActive(wxCommandEvent& event){
-
-
_wxvtkclipping3Dview->SetShade(event.IsChecked());
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
void OnInterpolationActive(wxCommandEvent& event);
void OnShadeActive(wxCommandEvent& event);
-
private:
wxVtkClipping3DView *_wxvtkclipping3Dview;
-
wxRadioButton *rbRayCasting;
wxRadioButton *rbMIP;
wxCheckBox *ckInterpolation;
wxCheckBox *ckVolum;
wxCheckBox *ckBoxVolume;
-
protected:
};