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()
+{}
#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