]> Creatis software - creaContours.git/commitdiff
BUG Threshold actor
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Mon, 20 Apr 2009 15:48:21 +0000 (15:48 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Mon, 20 Apr 2009 15:48:21 +0000 (15:48 +0000)
lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx

index dacf90a2c674a1d5931280cbd5fcef98ee401ead..d16860f764259305c585d266e8a129a6612b45d7 100644 (file)
@@ -593,10 +593,10 @@ void wxContourMainFrame::changeInstant()
                kernelManager->setInstant(instantVect);
                //_modelManager->setInstant( _actualInstant );
                
+           updateActor();
                updateInstantOutlines();
                updateInstantImageData();
                updateInstantAxes();
-               updateActor();
 }
 
 
@@ -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 );
                }
 }
 
@@ -1860,15 +1862,12 @@ void wxContourMainFrame::onThreshold(int minVal, int maxVal)
                if (_thresholdActor==NULL)
                {
                        _thresholdActor = vtkImageActor::New( );
-                       _thresholdActor->SetInput( mapperImage->GetOutput() );
                        _thresholdActor->SetOpacity( 0.6 );
-                       _thresholdActor->SetPosition( 0,0, z+1 );
                        _thresholdActor->InterpolateOn(  ); 
                }
-               else
-               {
-                       _thresholdActor->SetInput( mapperImage->GetOutput() );
-               }
+printf("EED wxContourMainFrame::onThreshold \n");      
+               _thresholdActor->SetPosition( 0,0, z+1 );
+               _thresholdActor->SetInput( mapperImage->GetOutput() );
 
                baseView->GetRenderer()->AddActor( _thresholdActor );
                _actorPresent = true;
@@ -1953,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();