]> Creatis software - creaContours.git/blobdiff - lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx
SetColorImage update
[creaContours.git] / lib / Interface_ManagerContour_NDimensions / wxContourMainFrame.cxx
index 1ce584994fc26d25f27de8c341be8249d293c964..c0b9dd263a2d008a69bc51d548ac0b3d5645362b 100644 (file)
@@ -3178,6 +3178,17 @@ wxPanel *wxContourMainFrame::getColorLayerImageViewPanel(wxWindow *parent)
        return _viewColorLayerImagePanel;
 }
 
+void wxContourMainFrame::SetColorLayerImage(vtkImageData* img)
+{
+       if (_viewColorLayerImagePanel!=NULL) 
+       {
+               if (img!=NULL)
+               {
+                       _viewColorLayerImagePanel->SetImage( img );
+                       RefreshInterface();
+               } // img
+       } // _viewColorLayerImagePanel
+}
 
 wxPanel *wxContourMainFrame::getThresholdImageViewPanel(wxWindow *parent)
 {
@@ -3185,13 +3196,14 @@ wxPanel *wxContourMainFrame::getThresholdImageViewPanel(wxWindow *parent)
        {
                double range[2];
                _theViewPanel->getImageData()->GetScalarRange(range);
-               int min = (int)floor (range[0]);
-               int max = (int)ceil (range[1]);
-               int start= (max+min)/2 - (max-min)*0.25; 
-               int end= (max+min)/2 + (max-min)*0.25; 
-               _viewThresholdImagePanel = new ThresholdImageViewPanel( parent, min, max, start, end , 1);
-               _viewThresholdImage = new ThresholdImageView();
+               int min                                         = (int)floor (range[0]);
+               int max                                         = (int)ceil (range[1]);
+               int start                                       = (max+min)/2 - (max-min)*0.25; 
+               int end                                         = (max+min)/2 + (max-min)*0.25; 
+               _viewThresholdImagePanel        = new ThresholdImageViewPanel( parent, min, max, start, end , 1);
+               _viewThresholdImage             = new ThresholdImageView();
                _viewThresholdImage->SetminMaxValue(start,end);
+//             _viewThresholdImage->SetminMaxValue(range[0],range[1]);
                _viewThresholdImage->SetImage( _theViewPanel->getImageData() );
                std::vector<int> colorbarposition;
                colorbarposition.push_back( 10 );