//-----------------------------------------------------------
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
}
//-----------------------------------------------------------
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
}
//------------------------------------------------------
//------------------------------------------------
void HistogramView::bbUserConstructor()
{
- wxwidget = NULL;
+
}
//------------------------------------------------
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
}
//------------------------------------------------------
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
}
//------------------------------------------------------
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)
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()
void CreateWidget(wxWindow* parent);
private:
- wxWidgetMPR *mwxwidgetmpr;
+ wxWidgetMPR *wxwidget;
};
BBTK_BEGIN_DESCRIBE_BLACK_BOX(ViewerMPR,bbtk::WxBlackBox);
if (wvbv2!=NULL) { bbSetOutputRenderer2( wvbv2->GetRenderer() ); }
if (wvbv3!=NULL) { bbSetOutputRenderer3( wvbv3->GetRenderer() ); }
if (wvbv4!=NULL) { bbSetOutputRenderer4( wvbv4->GetRenderer() ); }
- }
+ } // mwxwidget
}
//-------------------------------------------------------------