]> Creatis software - creaMaracasVisu.git/commitdiff
#3262 creaMaracasVisu Feature New Normal - Export LookupTable fron ColorLayerImageV... master
authorEduardo DAVILA <davila@localhost.localdomain>
Thu, 6 Jun 2019 09:07:14 +0000 (11:07 +0200)
committerEduardo DAVILA <davila@localhost.localdomain>
Thu, 6 Jun 2019 09:07:14 +0000 (11:07 +0200)
bbtk/src/bbcreaMaracasVisuColorLayerImageView.cxx
bbtk/src/bbcreaMaracasVisuColorLayerImageView.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewManager.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewManager.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.h

index e63f5da2d4a14ca66c3ab32be1463cd1541dbc7b..0fc2242b4f08dce552bb5ecdcb128a5af1cb911f 100644 (file)
@@ -74,6 +74,7 @@ void ColorLayerImageView::Process()
     clivp->SetImage( bbGetInputIn() );
 
     bbSetOutputNewImage( clivp->GetColorLayerImageViewManager()->GetImageChangeInformation(0) );
+    bbSetOutputLookupTable( clivp->GetColorLayerImageViewManager()->GetLookupTable(0) );
 
         if (firsttime==true)
         {
index 7abb52f075c90123308407dd79087ace627f6bb2..9b8cdc43fe22d2661060d8aaa526804993c078d9 100644 (file)
@@ -33,6 +33,7 @@
 #include "bbtkWxBlackBox.h"
 
 #include "wxVtkBaseView.h"
+#include <vtkScalarsToColors.h>
 
 namespace bbcreaMaracasVisu
 {
@@ -60,6 +61,7 @@ class bbcreaMaracasVisu_EXPORT ColorLayerImageView
   BBTK_DECLARE_INPUT(FittingMode,int);
   BBTK_DECLARE_INPUT(ColorBarPosition,std::vector<int>);
   BBTK_DECLARE_OUTPUT(NewImage,vtkImageData*);
+  BBTK_DECLARE_OUTPUT(LookupTable,vtkScalarsToColors*);
   BBTK_PROCESS(Process);
   void Process();
   BBTK_CREATE_WIDGET(CreateWidget);
@@ -98,6 +100,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(ColorLayerImageView,bbtk::WxBlackBox);
   BBTK_INPUT(ColorLayerImageView,ColorBarPosition,"default (10,105)",std::vector<int>,"");
 
   BBTK_OUTPUT(ColorLayerImageView,NewImage,"Image with correct Spacing",vtkImageData*,"");
+  BBTK_OUTPUT(ColorLayerImageView,LookupTable,"LookupTable",vtkScalarsToColors*,"");
 
 
 BBTK_END_DESCRIBE_BLACK_BOX(ColorLayerImageView);
index 8fdaa7c2b4a53befbf1fc84cdeac8e8ea0bfef25..9f5de8ad3c63ee107d81ba23cb9a432b48b64706 100644 (file)
@@ -444,7 +444,6 @@ void ColorLayerImageViewManager::GetSpcOriginalLayer(int id,double *spc)
        } // if 
 }
 
-//----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
 void ColorLayerImageViewManager::SetNewSpacingLayer(double *spc)
 {
@@ -458,7 +457,16 @@ void ColorLayerImageViewManager::SetNewSpacingLayer(double *spc)
   } // for 
 }
 
-
+//----------------------------------------------------------------------------
+vtkScalarsToColors* ColorLayerImageViewManager::GetLookupTable(int id)
+{
+       vtkScalarsToColors* lookuptable;
+       if (_colorLayerImageViewLst[id]!=NULL)
+       {
+          lookuptable = _colorLayerImageViewLst[id]->GetLookupTable( );
+       } // if 
+       return lookuptable;
+}
 
 // EOF
 
index f5c9c4cf6a9c76c22057ae3343cd5472726090c9..6589398626a2ebd8071425533952aec846c8f475 100644 (file)
@@ -76,6 +76,8 @@ class  ColorLayerImageViewManager
          void                          GetDimensionOriginalLayer       (int id,int     *dim);
          void                          GetSpcOriginalLayer                     (int id,double  *spc);
          void                          SetNewSpacingLayer                      (double *spc);
+         vtkScalarsToColors* GetLookupTable(int id);
+
 
   private:
 
index 51409832683b8cddf47972ce4209b37fec09ba04..5fd366cd9ce03bc4f4bf3c44684e1707702fd12b 100644 (file)
@@ -598,6 +598,12 @@ void LayerImageBase::GetImageScalarRange()
        _range[1]=max;
 }
 
+vtkScalarsToColors* LayerImageBase::GetLookupTable()
+{
+       return _thresholdTable;
+}
+
+
 
 
 // EOF
index e9eec4326fb1accd52bf854fb4da8b5fe686ee7f..ac329685949d6210ac67b99ae89a2ccfb0cea900 100644 (file)
@@ -119,6 +119,7 @@ class LayerImageBase
                void GetDimensionBase(int *dim);
                void GetSpcOriginalLayer(double *spc);
                void GetSpcBase(double *spc);
+               vtkScalarsToColors* GetLookupTable();
 
   private:
                int                                                     _X;