]> 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 95ed75e..9ece377 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 2c29296..649cf0c 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 70c7868..ebe3d76 100644 (file)
@@ -26,7 +26,7 @@ void HistogramView::CreateWidget(wxWindow* parent)
 //------------------------------------------------
 void HistogramView::bbUserConstructor()
 {
-       wxwidget = NULL;
+
 }
 
 //------------------------------------------------
index 7da8c56..ccd3092 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 f56957b..c76cc21 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 fe3a10d..4e191ea 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 796c389..6fca3cd 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 8c034d8..c31cbda 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
 }
 
 //-------------------------------------------------------------