From c0f82ff1e5e20e5b66886ab83e1753aa91b187fd Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Thu, 6 Jun 2019 11:07:14 +0200 Subject: [PATCH] #3262 creaMaracasVisu Feature New Normal - Export LookupTable fron ColorLayerImageView box --- bbtk/src/bbcreaMaracasVisuColorLayerImageView.cxx | 1 + bbtk/src/bbcreaMaracasVisuColorLayerImageView.h | 3 +++ .../ColorLayerImageViewManager.cxx | 12 ++++++++++-- .../ThresholdImageView/ColorLayerImageViewManager.h | 2 ++ .../widgets/ThresholdImageView/LayerImageBase.cxx | 6 ++++++ .../widgets/ThresholdImageView/LayerImageBase.h | 1 + 6 files changed, 23 insertions(+), 2 deletions(-) diff --git a/bbtk/src/bbcreaMaracasVisuColorLayerImageView.cxx b/bbtk/src/bbcreaMaracasVisuColorLayerImageView.cxx index e63f5da..0fc2242 100644 --- a/bbtk/src/bbcreaMaracasVisuColorLayerImageView.cxx +++ b/bbtk/src/bbcreaMaracasVisuColorLayerImageView.cxx @@ -74,6 +74,7 @@ void ColorLayerImageView::Process() clivp->SetImage( bbGetInputIn() ); bbSetOutputNewImage( clivp->GetColorLayerImageViewManager()->GetImageChangeInformation(0) ); + bbSetOutputLookupTable( clivp->GetColorLayerImageViewManager()->GetLookupTable(0) ); if (firsttime==true) { diff --git a/bbtk/src/bbcreaMaracasVisuColorLayerImageView.h b/bbtk/src/bbcreaMaracasVisuColorLayerImageView.h index 7abb52f..9b8cdc4 100644 --- a/bbtk/src/bbcreaMaracasVisuColorLayerImageView.h +++ b/bbtk/src/bbcreaMaracasVisuColorLayerImageView.h @@ -33,6 +33,7 @@ #include "bbtkWxBlackBox.h" #include "wxVtkBaseView.h" +#include namespace bbcreaMaracasVisu { @@ -60,6 +61,7 @@ class bbcreaMaracasVisu_EXPORT ColorLayerImageView BBTK_DECLARE_INPUT(FittingMode,int); BBTK_DECLARE_INPUT(ColorBarPosition,std::vector); 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,""); BBTK_OUTPUT(ColorLayerImageView,NewImage,"Image with correct Spacing",vtkImageData*,""); + BBTK_OUTPUT(ColorLayerImageView,LookupTable,"LookupTable",vtkScalarsToColors*,""); BBTK_END_DESCRIBE_BLACK_BOX(ColorLayerImageView); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewManager.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewManager.cxx index 8fdaa7c..9f5de8a 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewManager.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewManager.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewManager.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewManager.h index f5c9c4c..6589398 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewManager.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewManager.h @@ -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: diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx index 5140983..5fd366c 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx @@ -598,6 +598,12 @@ void LayerImageBase::GetImageScalarRange() _range[1]=max; } +vtkScalarsToColors* LayerImageBase::GetLookupTable() +{ + return _thresholdTable; +} + + // EOF diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.h index e9eec43..ac32968 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.h @@ -119,6 +119,7 @@ class LayerImageBase void GetDimensionBase(int *dim); void GetSpcOriginalLayer(double *spc); void GetSpcBase(double *spc); + vtkScalarsToColors* GetLookupTable(); private: int _X; -- 2.47.1