From: Eduardo Davila Date: Mon, 9 Feb 2009 08:56:08 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: EED.02Oct2009~124 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=3e9c68ee7f4cf675d205d937442f40971953d017;p=creaMaracasVisu.git *** empty log message *** --- diff --git a/bbtk/src/bbmaracasvisuContourCrown.cxx b/bbtk/src/bbmaracasvisuContourCrown.cxx index 95ed75e..9ece377 100644 --- a/bbtk/src/bbmaracasvisuContourCrown.cxx +++ b/bbtk/src/bbmaracasvisuContourCrown.cxx @@ -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 } //----------------------------------------------------------- diff --git a/bbtk/src/bbmaracasvisuContourVOI.cxx b/bbtk/src/bbmaracasvisuContourVOI.cxx index 2c29296..649cf0c 100644 --- a/bbtk/src/bbmaracasvisuContourVOI.cxx +++ b/bbtk/src/bbmaracasvisuContourVOI.cxx @@ -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 } //------------------------------------------------------ diff --git a/bbtk/src/bbmaracasvisuHistogramView.cxx b/bbtk/src/bbmaracasvisuHistogramView.cxx index 70c7868..ebe3d76 100644 --- a/bbtk/src/bbmaracasvisuHistogramView.cxx +++ b/bbtk/src/bbmaracasvisuHistogramView.cxx @@ -26,7 +26,7 @@ void HistogramView::CreateWidget(wxWindow* parent) //------------------------------------------------ void HistogramView::bbUserConstructor() { - wxwidget = NULL; + } //------------------------------------------------ diff --git a/bbtk/src/bbmaracasvisuShowNPoints.cxx b/bbtk/src/bbmaracasvisuShowNPoints.cxx index 7da8c56..ccd3092 100644 --- a/bbtk/src/bbmaracasvisuShowNPoints.cxx +++ b/bbtk/src/bbmaracasvisuShowNPoints.cxx @@ -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 } diff --git a/bbtk/src/bbmaracasvisuSliderMinMax.cxx b/bbtk/src/bbmaracasvisuSliderMinMax.cxx index f56957b..c76cc21 100644 --- a/bbtk/src/bbmaracasvisuSliderMinMax.cxx +++ b/bbtk/src/bbmaracasvisuSliderMinMax.cxx @@ -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 } //------------------------------------------------------ diff --git a/bbtk/src/bbmaracasvisuViewerMPR.cxx b/bbtk/src/bbmaracasvisuViewerMPR.cxx index fe3a10d..4e191ea 100644 --- a/bbtk/src/bbmaracasvisuViewerMPR.cxx +++ b/bbtk/src/bbmaracasvisuViewerMPR.cxx @@ -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() " <GetRenderer() ); } if (wvbv3!=NULL) { bbSetOutputRenderer3( wvbv3->GetRenderer() ); } if (wvbv4!=NULL) { bbSetOutputRenderer4( wvbv4->GetRenderer() ); } - } + } // mwxwidget } //-------------------------------------------------------------