From 0b13fb41beac010359eeb1dbf4457b69e28be3ea Mon Sep 17 00:00:00 2001 From: apo Date: Fri, 26 Aug 2005 05:47:02 +0000 Subject: [PATCH] To enforce development --- src/PIPELINE/VISU_GaussPointsPL.cxx | 66 ++--------------------------- src/PIPELINE/VISU_GaussPointsPL.hxx | 29 ++----------- 2 files changed, 7 insertions(+), 88 deletions(-) diff --git a/src/PIPELINE/VISU_GaussPointsPL.cxx b/src/PIPELINE/VISU_GaussPointsPL.cxx index ff967b12..c4400bdc 100644 --- a/src/PIPELINE/VISU_GaussPointsPL.cxx +++ b/src/PIPELINE/VISU_GaussPointsPL.cxx @@ -32,67 +32,7 @@ vtkStandardNewMacro(VISU_GaussPointsPL); VISU_GaussPointsPL::VISU_GaussPointsPL() -{ - myFieldTransform = VISU_FieldTransform::New(); +{} - myMapperTable = VISU_LookupTable::New(); - myMapperTable->SetScale(VTK_SCALE_LINEAR); - myMapperTable->SetHueRange(0.667,0.0); - - myBarTable = VISU_LookupTable::New(); - myBarTable->SetScale(VTK_SCALE_LINEAR); - myBarTable->SetHueRange(0.667,0.0); - - myExtractor = VISU_Extractor::New(); - - myIsShrinkable = true; -} - -void VISU_GaussPointsPL::Build() -{ - myExtractor->SetInput(GetInput2()); - myFieldTransform->SetInput(myExtractor->GetOutput()); - - myMapper->SetColorModeToMapScalars(); - myMapper->ScalarVisibilityOn(); - myMapper->SetInput( myFieldTransform->GetUnstructuredGridOutput() ); -} - -void VISU_GaussPointsPL::Init() -{ -} - -void VISU_GaussPointsPL::Update() -{ - float *aRange = myFieldTransform->GetScalarRange(); - float aScalarRange[2] = {aRange[0], aRange[1]}; - if(myBarTable->GetScale() == VTK_SCALE_LOG10) - VISU_LookupTable::ComputeLogRange(aRange,aScalarRange); - myMapperTable->SetRange(aScalarRange); - myMapperTable->SetMapScale(1.0); - - myMapperTable->Build(); - myBarTable->Build(); - - myMapper->SetLookupTable(myMapperTable); - myMapper->SetScalarRange(aScalarRange); - - VISU_PipeLine::Update(); -} - -void VISU_GaussPointsPL::SetScalarRange(float theRange[2]){ - myFieldTransform->SetScalarRange(theRange); - myBarTable->SetRange(theRange); - Modified(); -} - -void VISU_GaussPointsPL::GetSourceRange(float theRange[2]){ - myExtractor->Update(); - myExtractor->GetOutput()->GetScalarRange(theRange); -} - -void VISU_GaussPointsPL::SetSourceRange(){ - float aRange[2]; - GetSourceRange(aRange); - SetScalarRange(aRange); -} +VISU_GaussPointsPL::~VISU_GaussPointsPL() +{} diff --git a/src/PIPELINE/VISU_GaussPointsPL.hxx b/src/PIPELINE/VISU_GaussPointsPL.hxx index 9708b163..356641fd 100644 --- a/src/PIPELINE/VISU_GaussPointsPL.hxx +++ b/src/PIPELINE/VISU_GaussPointsPL.hxx @@ -28,38 +28,17 @@ #ifndef VISU_GaussPointsPL_HeaderFile #define VISU_GaussPointsPL_HeaderFile -#include "VISU_PipeLine.hxx" -#include "VISU_ScalarBarActor.hxx" +#include "VISU_ScalarMapPL.hxx" -class VISU_Extractor; -class VISU_FieldTransform; - -class VISU_GaussPointsPL : public VISU_PipeLine +class VISU_GaussPointsPL: public VISU_ScalarMapPL { protected: VISU_GaussPointsPL(); + virtual ~VISU_GaussPointsPL(); public: - vtkTypeMacro(VISU_GaussPointsPL,VISU_PipeLine); + vtkTypeMacro(VISU_GaussPointsPL,VISU_ScalarMapPL); static VISU_GaussPointsPL* New(); - - virtual void SetScalarRange(float theRange[2]); - -public: - virtual void Init(); - virtual void Build(); - virtual void Update(); - - virtual VISU_LookupTable *GetMapperTable(){ return myMapperTable;} - virtual VISU_LookupTable *GetBarTable(){ return myBarTable;} - - virtual void GetSourceRange(float theRange[2]); - virtual void SetSourceRange(); - -protected: - VISU_LookupTable *myMapperTable, *myBarTable; - VISU_FieldTransform *myFieldTransform; - VISU_Extractor* myExtractor; }; #endif -- 2.39.2