]> Creatis software - creaContours.git/blobdiff - lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx
BUG Threshold actor
[creaContours.git] / lib / Interface_ManagerContour_NDimensions / wxContourMainFrame.cxx
index 365cd88bf99817ae26d9000b2435a21b3e6d6215..d16860f764259305c585d266e8a129a6612b45d7 100644 (file)
@@ -593,10 +593,10 @@ void wxContourMainFrame::changeInstant()
                kernelManager->setInstant(instantVect);
                //_modelManager->setInstant( _actualInstant );
                
+           updateActor();
                updateInstantOutlines();
                updateInstantImageData();
                updateInstantAxes();
-               updateActor();
 }
 
 
@@ -660,7 +660,7 @@ void wxContourMainFrame :: updateActor()
                        img->Update();
                        img->UpdateInformation();
 
-                       wxVtkBaseView * baseView = _theViewPanel->getWxVtkBaseView();
+//EED???                       wxVtkBaseView * baseView = _theViewPanel->getWxVtkBaseView();
                        
                        double range[2];
                        img->GetScalarRange(range);
@@ -710,6 +710,8 @@ void wxContourMainFrame :: updateActor()
                        //mapperImage->SetOutputFormatToRGBA( );
 
                        _thresholdActor->SetInput( mapperImage->GetOutput() );
+                       printf("EED wxContourMainFrame::updateActor %d \n" , z);        
+                       _thresholdActor->SetPosition( 0,0, 900-1 );
                }
 }
 
@@ -1688,7 +1690,7 @@ void wxContourMainFrame::referenceLine()
                _refLineModel->SetCloseContour(false);
                _refLineControl->CreateNewManualContour();
 
-               double z = _refLineControl->GetZ();
+//EED??                double z = _refLineControl->GetZ();
        /*
                _refLineControl->AddPoint(50,100,z);
                _refLineControl->AddPoint(80,40,z);
@@ -1860,14 +1862,12 @@ void wxContourMainFrame::onThreshold(int minVal, int maxVal)
                if (_thresholdActor==NULL)
                {
                        _thresholdActor = vtkImageActor::New( );
-                       _thresholdActor->SetInput( mapperImage->GetOutput() );
                        _thresholdActor->SetOpacity( 0.6 );
-                       _thresholdActor->InterpolateOn( ); 
-               }
-               else
-               {
-                       _thresholdActor->SetInput( mapperImage->GetOutput() );
+                       _thresholdActor->InterpolateOn(  ); 
                }
+printf("EED wxContourMainFrame::onThreshold \n");      
+               _thresholdActor->SetPosition( 0,0, z+1 );
+               _thresholdActor->SetInput( mapperImage->GetOutput() );
 
                baseView->GetRenderer()->AddActor( _thresholdActor );
                _actorPresent = true;
@@ -1905,7 +1905,7 @@ void wxContourMainFrame::onThresholdChange(int minVal, int maxVal)
                img->Update();
                img->UpdateInformation();
 
-               wxVtkBaseView * baseView = _theViewPanel->getWxVtkBaseView();
+//EED??                wxVtkBaseView * baseView = _theViewPanel->getWxVtkBaseView();
                
                double range[2];
                img->GetScalarRange(range);
@@ -1952,6 +1952,9 @@ void wxContourMainFrame::onThresholdChange(int minVal, int maxVal)
                //mapperImage->SetOutputFormatToRGBA( );
 
                _thresholdActor->SetInput( mapperImage->GetOutput() );
+printf("EED wxContourMainFrame::onThresholdChange \n");        
+               _thresholdActor->SetPosition( 0,0, z+1 );
+
        }
 
        RefreshInterface();