]> Creatis software - creaMaracasVisu.git/commitdiff
*** empty log message ***
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Mon, 9 Feb 2009 08:56:08 +0000 (08:56 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Mon, 9 Feb 2009 08:56:08 +0000 (08:56 +0000)
bbtk/src/bbmaracasvisuContourCrown.cxx
bbtk/src/bbmaracasvisuContourVOI.cxx
bbtk/src/bbmaracasvisuHistogramView.cxx
bbtk/src/bbmaracasvisuShowNPoints.cxx
bbtk/src/bbmaracasvisuSliderMinMax.cxx
bbtk/src/bbmaracasvisuViewerMPR.cxx
bbtk/src/bbmaracasvisuViewerMPR.h
bbtk/src/bbmaracasvisuViewerNV.cxx

index 95ed75e4d6589a6e751f85e0f7cee90c45071864..9ece377e0f442d1730da75d86843ec727284c283 100644 (file)
@@ -12,32 +12,35 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ContourCrown,bbtk::WxBlackBox);
 //-----------------------------------------------------------
 void ContourCrown::Process()
 {
-//JSTG 04-04-08
-       mwxwidget->SetControlPoints( bbGetInputControlPointsInX(), bbGetInputControlPointsInY(), bbGetInputControlPointsInZ() );
-       
-       LstValuePosX.clear();
-       LstValuePosY.clear();
-       LstValuePosZ.clear();
-       mwxwidget->GetValuesInsideCrown(&LstValue,&LstValuePosX,&LstValuePosY,&LstValuePosZ);
-
-//JSTG 226-02-08 ----------------------------------------------------------
-       LstContourX.clear();
-       LstContourY.clear();
-       LstContourZ.clear();
-       mwxwidget->GetSplinePoints(&LstContourX,&LstContourY,&LstContourZ);
-//-------------------------------------------------------------------------
-
-       bbSetOutputLstValue(&LstValue);
-       bbSetOutputLstValuePosX(&LstValuePosX);
-       bbSetOutputLstValuePosY(&LstValuePosY);
-       bbSetOutputLstValuePosZ(&LstValuePosZ);
-       bbSetOutputLstContourX(&LstContourX);
-       bbSetOutputLstContourY(&LstContourY);
-       bbSetOutputLstContourZ(&LstContourZ);
-       bbSetOutputLstContourCrlX(&LstContourCrlX);
-       bbSetOutputLstContourCrlY(&LstContourCrlY);
-       bbSetOutputLstContourCrlZ(&LstContourCrlZ);
-       bbSetOutputLstContourCrlZ(&LstContourCrlZ);
+
+       if (mwxwidget!=NULL){
+               //JSTG 04-04-08
+               mwxwidget->SetControlPoints( bbGetInputControlPointsInX(), bbGetInputControlPointsInY(), bbGetInputControlPointsInZ() );
+               
+               LstValuePosX.clear();
+               LstValuePosY.clear();
+               LstValuePosZ.clear();
+               mwxwidget->GetValuesInsideCrown(&LstValue,&LstValuePosX,&LstValuePosY,&LstValuePosZ);
+
+               //JSTG 226-02-08 ----------------------------------------------------------
+               LstContourX.clear();
+               LstContourY.clear();
+               LstContourZ.clear();
+               mwxwidget->GetSplinePoints(&LstContourX,&LstContourY,&LstContourZ);
+               //-------------------------------------------------------------------------
+
+               bbSetOutputLstValue(&LstValue);
+               bbSetOutputLstValuePosX(&LstValuePosX);
+               bbSetOutputLstValuePosY(&LstValuePosY);
+               bbSetOutputLstValuePosZ(&LstValuePosZ);
+               bbSetOutputLstContourX(&LstContourX);
+               bbSetOutputLstContourY(&LstContourY);
+               bbSetOutputLstContourZ(&LstContourZ);
+               bbSetOutputLstContourCrlX(&LstContourCrlX);
+               bbSetOutputLstContourCrlY(&LstContourCrlY);
+               bbSetOutputLstContourCrlZ(&LstContourCrlZ);
+               bbSetOutputLstContourCrlZ(&LstContourCrlZ);
+       } // mwxwidget
 }
 
 //-----------------------------------------------------------
index 2c2929680588edb62af4fdf7ac1a9c3030bdc078..649cf0cffe20d56573b5b123d0c7cd8a1e319d88 100644 (file)
@@ -94,18 +94,20 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ContourVOI,bbtk::WxBlackBox);
 void ContourVOI::Process()
 {  
        wxWidgetVOI* wxwidgetvoi = (wxWidgetVOI*)bbGetOutputWidget();
-       ContourVOIWidget* contourvoiwidget = wxwidgetvoi->GetContourVOIWidget();
-    
-       int voi[6];
-       contourvoiwidget->GetVOI(voi);
-       char buffer[40];
-       sprintf(buffer,"%d %d %d ", voi[0], voi[2], voi[4] );
-       std::string Index(buffer);
-       sprintf(buffer,"%d %d %d ", voi[1]-voi[0]+1, voi[3]-voi[2]+1, voi[5]-voi[4]+1 );
-       std::string Size(buffer);
-
-       bbSetOutputIndex( Index );
-       bbSetOutputSize( Size );
+       if (wxwidgetvoi!=NULL){
+               ContourVOIWidget* contourvoiwidget = wxwidgetvoi->GetContourVOIWidget();
+           
+               int voi[6];
+               contourvoiwidget->GetVOI(voi);
+               char buffer[40];
+               sprintf(buffer,"%d %d %d ", voi[0], voi[2], voi[4] );
+               std::string Index(buffer);
+               sprintf(buffer,"%d %d %d ", voi[1]-voi[0]+1, voi[3]-voi[2]+1, voi[5]-voi[4]+1 );
+               std::string Size(buffer);
+
+               bbSetOutputIndex( Index );
+               bbSetOutputSize( Size );
+       } //wxwidgetvoi
 }
 
 //------------------------------------------------------
index 70c7868f60ed30b1b7f13fff2064ad89cf8a49d8..ebe3d766798b61f2e49fbcbea164ff656cd0fd04 100644 (file)
@@ -26,7 +26,7 @@ void HistogramView::CreateWidget(wxWindow* parent)
 //------------------------------------------------
 void HistogramView::bbUserConstructor()
 {
-       wxwidget = NULL;
+
 }
 
 //------------------------------------------------
index 7da8c5679899bf767ac1f55264500efaa0c24eff..ccd3092010052435c663fe7927bd6435bdb9a0cb 100644 (file)
@@ -182,15 +182,17 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ShowNPoints,bbtk::WxBlackBox);
 
 void ShowNPoints::Process()
 {
-       mwxwidget->SetPoint( bbGetInputIn() );   
-       mwxwidget->SetImage( bbGetInputImage() );   
-       mwxwidget->SetColour( bbGetInputColour() );   
-       mwxwidget->SetOpacity( bbGetInputOpacity() );   
-       mwxwidget->SetRadio( bbGetInputRadio() );   
-
-       bbSetOutputlstPointsX( mwxwidget->GetLstPointsX() );
-       bbSetOutputlstPointsY( mwxwidget->GetLstPointsY() );
-       bbSetOutputlstPointsZ( mwxwidget->GetLstPointsZ() );
+       if (mwxwidget!=NULL){
+               mwxwidget->SetPoint( bbGetInputIn() );   
+               mwxwidget->SetImage( bbGetInputImage() );   
+               mwxwidget->SetColour( bbGetInputColour() );   
+               mwxwidget->SetOpacity( bbGetInputOpacity() );   
+               mwxwidget->SetRadio( bbGetInputRadio() );   
+
+               bbSetOutputlstPointsX( mwxwidget->GetLstPointsX() );
+               bbSetOutputlstPointsY( mwxwidget->GetLstPointsY() );
+               bbSetOutputlstPointsZ( mwxwidget->GetLstPointsZ() );
+       } // mwxwidget
 }
 
 
index f56957b40ec484cdbb3c9e15cccea9bf500d34f0..c76cc21b338152d7fab7850415e51457c18de328 100644 (file)
@@ -78,9 +78,11 @@ BBTK_BLACK_BOX_IMPLEMENTATION(SliderMinMax,bbtk::WxBlackBox);
 //------------------------------------------------------
 void SliderMinMax::Process()
 {
-       bbSetOutputOutStart(mwxwidget->GetStart());
-       bbSetOutputOutEnd(mwxwidget->GetEnd());
-       bbSetOutputOutActual(mwxwidget->GetActual());
+       if (mwxwidget!=NULL){
+               bbSetOutputOutStart(mwxwidget->GetStart());
+               bbSetOutputOutEnd(mwxwidget->GetEnd());
+               bbSetOutputOutActual(mwxwidget->GetActual());
+       } // mwxwidget
 }
 
 //------------------------------------------------------
index fe3a10d73a92d75de7ce56c481c5049d0bc61ad1..4e191ea98a4c8fe37df0f9e758c9fb7a2d0d9764 100644 (file)
@@ -109,9 +109,11 @@ BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ViewerMPR)
 BBTK_BLACK_BOX_IMPLEMENTATION(ViewerMPR,bbtk::WxBlackBox);
 void ViewerMPR::Process()
 {
+       if (wxwidget!=NULL){
                wxBusyCursor wait;         
-               bbSetOutputPoint( mwxwidgetmpr->GetPoint() );
-               bbSetOutputRenderer( mwxwidgetmpr->GetRenderer() );  
+               bbSetOutputPoint( wxwidget->GetPoint() );
+               bbSetOutputRenderer( wxwidget->GetRenderer() );  
+       } // wxwidget
 }
 
 void ViewerMPR::CreateWidget(wxWindow* parent)
@@ -119,8 +121,8 @@ void ViewerMPR::CreateWidget(wxWindow* parent)
        bbtkDebugMessageInc("Core",9,"ViewerMPR::CreateWidget() " <<std::endl);
        marImageData    *marimagedata = new marImageData(bbGetInputIn() );
        bbtkDebugDecTab("Core",9);
-       mwxwidgetmpr = new wxWidgetMPR(this , parent ,marimagedata);
-       bbSetOutputWidget( mwxwidgetmpr );
+       wxwidget = new wxWidgetMPR(this , parent ,marimagedata);
+       bbSetOutputWidget( wxwidget );
 }
 
 void ViewerMPR::bbUserConstructor()
index 796c3893f75f0004cae6a79269026e260349357f..6fca3cd64d9843ae0e791b7282ed9722d1ba39b7 100644 (file)
@@ -71,7 +71,7 @@ virtual void bbUserDestructor();
   void CreateWidget(wxWindow* parent);
 
 private:
-  wxWidgetMPR *mwxwidgetmpr;
+  wxWidgetMPR *wxwidget;
 };
 
 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ViewerMPR,bbtk::WxBlackBox);
index 8c034d82d46b26bf2410e0ef857e3b374f2fc0b0..c31cbda1ca18d3aaa3be72edc3894801553819c7 100644 (file)
@@ -80,7 +80,7 @@ void ViewerNV::Process()
                if (wvbv2!=NULL) { bbSetOutputRenderer2( wvbv2->GetRenderer() ); }
                if (wvbv3!=NULL) { bbSetOutputRenderer3( wvbv3->GetRenderer() ); }
                if (wvbv4!=NULL) { bbSetOutputRenderer4( wvbv4->GetRenderer() ); }
-       }
+       } // mwxwidget
 }
 
 //-------------------------------------------------------------