]> Creatis software - creaMaracasVisu.git/blobdiff - bbtk/src/bbmaracasvisuViewerNV.cxx
ViewerNV 2D with color Transfer Function
[creaMaracasVisu.git] / bbtk / src / bbmaracasvisuViewerNV.cxx
index 4dfa24f457ab4461afc5360d90db87e94ebf4d01..ae65750acbf5673d2d0f57438e1ff4045abb8c94 100644 (file)
@@ -72,11 +72,11 @@ void ViewerNV::Process()
                
                if(!compareVectors(type, currenttype)){
                        mwxwidget->SetType(&type);
-                       mwxwidget->UpdateLayout(img);
+                       mwxwidget->UpdateLayout(img);                   
                }else if (img != currentimg){           
                        mwxwidget->SetImage(img);
                        //mwxwidget->UpdateLayout(img);
-               }
+               }               
                currenttype = type;
                currentimg = img;
                
@@ -104,6 +104,10 @@ void ViewerNV::Process()
                if (wvbv2!=NULL) { bbSetOutputRenderer2( wvbv2->GetRenderer() ); }
                if (wvbv3!=NULL) { bbSetOutputRenderer3( wvbv3->GetRenderer() ); }
                if (wvbv4!=NULL) { bbSetOutputRenderer4( wvbv4->GetRenderer() ); }
+
+               if(bbGetInputColorFunction()!=NULL){
+                       mwxwidget->setColorTransferFunction(bbGetInputColorFunction());
+               }
        }       
 }
 
@@ -144,6 +148,7 @@ void ViewerNV::bbUserSetDefaultValues()
                bbSetOutputRenderer2( NULL );
                bbSetOutputRenderer3( NULL );
                bbSetOutputRenderer4( NULL );
+               bbSetInputColorFunction(NULL);
 }
 
        //-----------------------------------------------------------------