From 56a256c7d1687cb895052aa6353260654820e0eb Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Wed, 15 Feb 2012 13:17:46 +0000 Subject: [PATCH] no message --- bbtk/src/bbcreaMaracasVisuTubeFilter.cxx | 14 ++++ ...aMaracasVisuwxVtkBaseViewToVtkRenderer.cxx | 71 +++++++++++++++++++ ...reaMaracasVisuwxVtkBaseViewToVtkRenderer.h | 49 +++++++++++++ .../ColorLayerImageView.cxx | 2 +- 4 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 bbtk/src/bbcreaMaracasVisuwxVtkBaseViewToVtkRenderer.cxx create mode 100644 bbtk/src/bbcreaMaracasVisuwxVtkBaseViewToVtkRenderer.h diff --git a/bbtk/src/bbcreaMaracasVisuTubeFilter.cxx b/bbtk/src/bbcreaMaracasVisuTubeFilter.cxx index 995c58d..3a284d1 100644 --- a/bbtk/src/bbcreaMaracasVisuTubeFilter.cxx +++ b/bbtk/src/bbcreaMaracasVisuTubeFilter.cxx @@ -143,14 +143,28 @@ namespace bbcreaMaracasVisu polyData->GetPointData()->AddArray(colors); vtkSmartPointer tube = vtkSmartPointer::New(); + tube->CappingOn(); tube->SetInput(polyData); tube->SetNumberOfSides(nTv); tube->SetVaryRadiusToVaryRadiusByAbsoluteScalar(); vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(tube->GetOutputPort()); +// mapper->ScalarVisibilityOn(); +// mapper->SetScalarModeToUsePointFieldData(); + mapper->ScalarVisibilityOn(); + +// mapper->SetScalarModeToUseCellData(); +// mapper->SetScalarModeToUseCellFieldData(); +// mapper->SetScalarModeToUseFieldData(); +// mapper->SetScalarModeToUsePointData(); mapper->SetScalarModeToUsePointFieldData(); + + mapper->SetColorModeToDefault(); +// mapper->SetColorModeToMapScalars(); + + mapper->SelectColorArray("Colors"); // vtkSmartPointer actor =vtkSmartPointer::New(); diff --git a/bbtk/src/bbcreaMaracasVisuwxVtkBaseViewToVtkRenderer.cxx b/bbtk/src/bbcreaMaracasVisuwxVtkBaseViewToVtkRenderer.cxx new file mode 100644 index 0000000..e7d94f1 --- /dev/null +++ b/bbtk/src/bbcreaMaracasVisuwxVtkBaseViewToVtkRenderer.cxx @@ -0,0 +1,71 @@ +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +#include "bbcreaMaracasVisuwxVtkBaseViewToVtkRenderer.h" +#include "bbcreaMaracasVisuPackage.h" +namespace bbcreaMaracasVisu +{ + +BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,wxVtkBaseViewToVtkRenderer) +BBTK_BLACK_BOX_IMPLEMENTATION(wxVtkBaseViewToVtkRenderer,bbtk::AtomicBlackBox); +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +void wxVtkBaseViewToVtkRenderer::Process() +{ + +// THE MAIN PROCESSING METHOD BODY +// Here we simply set the input 'In' value to the output 'Out' +// And print out the output value +// INPUT/OUTPUT ACCESSORS ARE OF THE FORM : +// void bbSet{Input|Output}NAME(const TYPE&) +// const TYPE& bbGet{Input|Output}NAME() const +// Where : +// * NAME is the name of the input/output +// (the one provided in the attribute 'name' of the tag 'input') +// * TYPE is the C++ type of the input/output +// (the one provided in the attribute 'type' of the tag 'input') + + bbSetOutputOut( bbGetInputIn()->GetRenderer() ); + +} +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +void wxVtkBaseViewToVtkRenderer::bbUserSetDefaultValues() +{ + +// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX +// Here we initialize the input 'In' to 0 + bbSetInputIn(0); + +} +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +void wxVtkBaseViewToVtkRenderer::bbUserInitializeProcessing() +{ + +// THE INITIALIZATION METHOD BODY : +// Here does nothing +// but this is where you should allocate the internal/output pointers +// if any + + +} +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +void wxVtkBaseViewToVtkRenderer::bbUserFinalizeProcessing() +{ + +// THE FINALIZATION METHOD BODY : +// Here does nothing +// but this is where you should desallocate the internal/output pointers +// if any + +} +} +// EO namespace bbcreaMaracasVisu + + diff --git a/bbtk/src/bbcreaMaracasVisuwxVtkBaseViewToVtkRenderer.h b/bbtk/src/bbcreaMaracasVisuwxVtkBaseViewToVtkRenderer.h new file mode 100644 index 0000000..90eae54 --- /dev/null +++ b/bbtk/src/bbcreaMaracasVisuwxVtkBaseViewToVtkRenderer.h @@ -0,0 +1,49 @@ +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +#ifndef __bbcreaMaracasVisuwxVtkBaseViewToVtkRenderer_h_INCLUDED__ +#define __bbcreaMaracasVisuwxVtkBaseViewToVtkRenderer_h_INCLUDED__ +#include "bbcreaMaracasVisu_EXPORT.h" +#include "bbtkAtomicBlackBox.h" +#include "iostream" + +#include "vtkRenderer.h" +#include "wxVtkBaseView.h" + +namespace bbcreaMaracasVisu +{ + +class bbcreaMaracasVisu_EXPORT wxVtkBaseViewToVtkRenderer + : + public bbtk::AtomicBlackBox +{ + BBTK_BLACK_BOX_INTERFACE(wxVtkBaseViewToVtkRenderer,bbtk::AtomicBlackBox); +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== + BBTK_DECLARE_INPUT(In,wxVtkBaseView*); + BBTK_DECLARE_OUTPUT(Out,vtkRenderer*); + BBTK_PROCESS(Process); + void Process(); +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +}; + +BBTK_BEGIN_DESCRIBE_BLACK_BOX(wxVtkBaseViewToVtkRenderer,bbtk::AtomicBlackBox); +BBTK_NAME("wxVtkBaseViewToVtkRenderer"); +BBTK_AUTHOR("Info-Dev"); +BBTK_DESCRIPTION("wxVtkBaseView* To vtkRenderer*"); +BBTK_CATEGORY(""); +BBTK_DEFAULT_ADAPTOR(); +BBTK_INPUT(wxVtkBaseViewToVtkRenderer,In,"wxVtkBaseView",wxVtkBaseView*,""); +BBTK_OUTPUT(wxVtkBaseViewToVtkRenderer,Out,"vtkRenderer",vtkRenderer*,""); +BBTK_END_DESCRIBE_BLACK_BOX(wxVtkBaseViewToVtkRenderer); +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +} +// EO namespace bbcreaMaracasVisu + +#endif // __bbcreaMaracasVisuwxVtkBaseViewToVtkRenderer_h_INCLUDED__ + diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx index 01c53b7..0e8d563 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx @@ -110,7 +110,7 @@ void ColorLayerImageView::ConfigLookupTable() // virtual } if ((ii>=delta2) && (ii<=delta3)) // iRed { - thresholdTable->SetTableValue( i , 1 , (delta-iRed)/delta , 0 , 1); + thresholdTable->SetTableValue( i , (delta-iRed)/delta, 0 , 0 , 1); iRed++; } } // for -- 2.47.1