sizer1->Add(btnDeleteAllPoints);
sizer1->Add(txtNrPoints);
sizer1->Add(txOpacity);
- sizer1->Add(sdrOpacity);
+ sizer1->Add(sdrOpacity,1,wxGROW );
sizer1->Add(txRadio);
- sizer1->Add(sdrRadio);
+ sizer1->Add(sdrRadio,1,wxGROW );
sizer1->Add(btnSavePoints);
sizer1->Add(btnLoadPoints);
{
this->mopacity=opacity;
//NTU: For Slider
- sdrOpacity->SetValue(this->mopacity*100.0);
+ sdrOpacity->SetValue(this->mopacity/100.0);
}
//------------------------------------------------------------------------
void ShowNPoints::Process()
{
- if (mwxwidget!=NULL){
+ if (mwxwidget!=NULL)
+ {
mwxwidget->SetRenderer( bbGetInputRenderer() );
mwxwidget->SetPoint( bbGetInputIn() );
mwxwidget->SetImage( bbGetInputImage() );
void ShowNPoints::CreateWidget(wxWindow* parent)
{
mwxwidget = new WidgetShowNPoints( parent, this);
- mwxwidget->SetPoint( bbGetInputIn() );
-
- if (bbGetInputImage()==NULL)
- {
- printf("Missing Image (ShowNPoints) \n");
- }
-
- bbSetOutputWidget( mwxwidget );
+ bbSetOutputWidget( mwxwidget );
}
void ShowNPoints::bbUserSetDefaultValues()
//-------------------------------------------------------------
void ViewerNV::Process()
{
-
vtkImageData* img = bbGetInputIn();
/*
double spc[3];
*/
std::vector<int> type = bbGetInputnTypeView();
-// std::cout<<"img "<<img<<std::endl;
-// std::cout<<"widget "<<mwxwidget<<std::endl;
-
- if(img != NULL && mwxwidget != NULL){// && !enter){
-// if( mwxwidget != NULL){// && !enter){
-
+
+ if(img != NULL && mwxwidget != NULL){
if(!compareVectors(type, currenttype)){
mwxwidget->SetType(&type);
mwxwidget->UpdateLayout(img);
//mwxwidget->UpdateLayout(img);
}
- mwxwidget->ConfigureVTK();
+ if (firsttime==true) // EED 21 aout 2010
+ {
+ firsttime=false;
+ mwxwidget->ConfigureVTK();
+ }
mwxwidget->RefreshView();
currenttype = type;
if (wvbv3!=NULL) { bbSetOutputRenderer3( wvbv3->GetRenderer() ); }
if (wvbv4!=NULL) { bbSetOutputRenderer4( wvbv4->GetRenderer() ); }
- if (wvbv1!=NULL) { bbSetOutputInteractor1( wvbv1->GetWxVTKRenderWindowInteractor() );
+ if (wvbv1!=NULL)
+ {
+ bbSetOutputInteractor1( wvbv1->GetWxVTKRenderWindowInteractor() );
updateObservers();
}
- if(bbGetInputColorFunction()!=NULL){
+ if(bbGetInputColorFunction()!=NULL)
+ {
mwxwidget->setColorTransferFunction(bbGetInputColorFunction());
}
- if(bbGetInputWindowLevel()!=-1){
- mwxwidget->setWindowLevel(bbGetInputWindowLevel());
+ if(bbGetInputWindowLevel()!=-1)
+ {
+ mwxwidget->setWindowLevel(bbGetInputWindowLevel());
}
- if(bbGetInputColorLevel()!=-1){
- if(bbGetInputColorLevel() == 0){
+ if(bbGetInputColorLevel()!=-1)
+ {
+ if(bbGetInputColorLevel() == 0)
+ {
std::cout<<"colorlevel "<<bbGetInputColorLevel()<<std::endl;
mwxwidget->setColorLevel(0.1);
}else{
//-------------------------------------------------------------
void ViewerNV::bbUserSetDefaultValues()
{
- mwxwidget = NULL;
- bbSetInputIn(NULL);
-
- bbSetInputObs1(NULL);
- bbSetInputObs2(NULL);
- bbSetInputObs3(NULL);
- bbSetInputObs4(NULL);
- bbSetInputObs5(NULL);
-
- std::vector<int> vecNTypeViwer;
- vecNTypeViwer.push_back(5);
- vecNTypeViwer.push_back(0);
- vecNTypeViwer.push_back(1);
- vecNTypeViwer.push_back(3);
- bbSetInputnTypeView(vecNTypeViwer);
-
- bbSetOutputwxVtkBaseView1( NULL );
- bbSetOutputwxVtkBaseView2( NULL );
- bbSetOutputwxVtkBaseView3( NULL );
- bbSetOutputwxVtkBaseView4( NULL );
- bbSetOutputRenderer1( NULL );
- bbSetOutputRenderer2( NULL );
- bbSetOutputRenderer3( NULL );
- bbSetOutputRenderer4( NULL );
- bbSetInputColorFunction(NULL);
- bbSetInputWindowLevel(-1);
- bbSetInputColorLevel(-1);
+ firsttime=true;
+ mwxwidget = NULL;
+ bbSetInputIn(NULL);
+
+ bbSetInputObs1(NULL);
+ bbSetInputObs2(NULL);
+ bbSetInputObs3(NULL);
+ bbSetInputObs4(NULL);
+ bbSetInputObs5(NULL);
+
+ std::vector<int> vecNTypeViwer;
+ vecNTypeViwer.push_back(5);
+ vecNTypeViwer.push_back(0);
+ vecNTypeViwer.push_back(1);
+ vecNTypeViwer.push_back(3);
+ bbSetInputnTypeView(vecNTypeViwer);
+
+ bbSetOutputwxVtkBaseView1( NULL );
+ bbSetOutputwxVtkBaseView2( NULL );
+ bbSetOutputwxVtkBaseView3( NULL );
+ bbSetOutputwxVtkBaseView4( NULL );
+ bbSetOutputRenderer1( NULL );
+ bbSetOutputRenderer2( NULL );
+ bbSetOutputRenderer3( NULL );
+ bbSetOutputRenderer4( NULL );
+ bbSetInputColorFunction(NULL);
+ bbSetInputWindowLevel(-1);
+ bbSetInputColorLevel(-1);
}
- //-----------------------------------------------------------------
- void ViewerNV::bbUserInitializeProcessing()
- {
- }
+//-----------------------------------------------------------------
+void ViewerNV::bbUserInitializeProcessing()
+{
+}
- //-----------------------------------------------------------------
- void ViewerNV::bbUserFinalizeProcessing()
- {
- }
+//-----------------------------------------------------------------
+void ViewerNV::bbUserFinalizeProcessing()
+{
+}
- //-----------------------------------------------------------------
+//-----------------------------------------------------------------
Program: wxMaracas
Module: $RCSfile: wxMaracas_ViewerWidget.cxx,v $
Language: C++
- Date: $Date: 2010/04/29 16:05:34 $
- Version: $Revision: 1.28 $
+ Date: $Date: 2010/08/21 15:19:14 $
+ Version: $Revision: 1.29 $
Copyright: (c) 2002, 2003
License:
if ( mwidgetMesure !=NULL ) { mwidgetMesure->SetMesureScale( 1 ); }
if ( mwxsphereview !=NULL ) { mwxsphereview->Configure(); }
- if (mwxvtk3Dbaseview_Clipping3D !=NULL) {
- mwxvtk3Dbaseview_Clipping3D->Configure();
-
+ if (mwxvtk3Dbaseview_Clipping3D !=NULL)
+ {
+ mwxvtk3Dbaseview_Clipping3D->Configure();
}
- if (vtkmpr3Ddataviewer !=NULL) {
- vtkmpr3Ddataviewer->Configure();
-
+ if (vtkmpr3Ddataviewer !=NULL)
+ {
+ vtkmpr3Ddataviewer->Configure();
}
- if (mwxvtkmpr3Dview !=NULL) {
-
+
+ if (mwxvtkmpr3Dview !=NULL)
+ {
mwxvtkmpr3Dview->Configure();
mwxvtkmpr3Dview->ResetCamera(ext,org,spc);
-
}
- if (mwxvtkclipping3Dview !=NULL) { mwxvtkclipping3Dview->Configure(); }
+ if (mwxvtkclipping3Dview !=NULL)
+ {
+ mwxvtkclipping3Dview->Configure();
+ }
//if(vtkmpr3Ddataviewer!=NULL){vtkmpr3Ddataviewer->Configure();}
// RefreshView();