void nDimensions::Process()
{
- double **vectx = 0, **vecty = 0, **vectz = 0;
- std::vector< void * > vectortemp;
- std::vector<int> size;
- vtkImageData **mask = 0, **value = 0;
- vtkImageData* img = bbGetInputIn();
- std::vector<vtkImageData*> selectedimages;
- if(img!=NULL && currentimg!=img)
- {
- wxContourMainFrame::getInstance()->ShowToolsPanel(true);
- currentimg=img;
- selectedimages.push_back(img);
- wxContourMainFrame::getInstance()->configure(selectedimages);
- } // if img
-
- if(currentimg != NULL)
- {
- int contourtype = bbGetInputContourType();
- //wxContourMainFrame::getInstance()->getValuesXYZ(vectx, vecty, vectz, &size);
- //wxContourMainFrame::getInstance()->getMaskValue(mask, value, contourtype);
- } // if currentimg
+// double **vectx = 0, **vecty = 0, **vectz = 0;
+// std::vector< void * > vectortemp;
+// std::vector<int> size;
+// vtkImageData **mask = 0, **value = 0;
+
+ if (firsttime==true)
+ {
+ firsttime=false;
+ std::vector<vtkImageData*> selectedimages;
+ if(bbGetInputIn()!=NULL)
+ {
+ currentimg = bbGetInputIn();
+ selectedimages.push_back( bbGetInputIn() );
+ wxContourMainFrame::getInstance()->ShowToolsPanel(true);
+ wxContourMainFrame::getInstance()->configure(selectedimages);
+ } // if In
+ } else{
+
+ //wxContourMainFrame::getInstance()->getValuesXYZ(vectx, vecty, vectz, &size);
+ //wxContourMainFrame::getInstance()->getMaskValue(mask, value, contourtype);
+
+ if ( currentimg!=bbGetInputIn() )
+ {
+ wxContourMainFrame::getInstance()->changeImage(0, bbGetInputIn() );
+ currentimg=bbGetInputIn();
+ } // if currentimg!=In
+
+
+ } // if firsttime
wxContourMainFrame::getInstance()->RefreshInterface();
bbSetOutputwxContourMainFrame( wxContourMainFrame::getInstance() );
// bbSetOutputX(vectx);
//-----------------------------------------------------------------
void nDimensions::bbUserSetDefaultValues()
{
- currentimg=NULL;
+ firsttime = true;
+ currentimg = NULL;
bbSetInputContourType(0);
bbSetInputIn(NULL);
}