From 044c3c22bdb49776579b693422a25da8b2dd81a9 Mon Sep 17 00:00:00 2001 From: ouv Date: Thu, 1 Jun 2017 19:16:24 +0300 Subject: [PATCH] 0004000: External 20812 Export AXIAL PHOTO --- src/Plot3d/Plot3d_Actor.cxx | 67 ++++++++++++++++++++++++++++--------- src/Plot3d/Plot3d_Actor.h | 30 ++++++++++++++--- 2 files changed, 77 insertions(+), 20 deletions(-) diff --git a/src/Plot3d/Plot3d_Actor.cxx b/src/Plot3d/Plot3d_Actor.cxx index f6d2719f8..f79a9dcaa 100644 --- a/src/Plot3d/Plot3d_Actor.cxx +++ b/src/Plot3d/Plot3d_Actor.cxx @@ -48,6 +48,13 @@ vtkStandardNewMacro(Plot3d_Actor); //============================================================================= Plot3d_Actor::Plot3d_Actor() { + // Input data + myNX = 0; + myNY = 0; + myMinValue = 0; + myMaxValue = 0; + myValueScaleFactorDegree = 0; // degree of the value scale factor (value = value_base * 10^degree) + // Pipeline myWarpScalar = vtkWarpScalar::New(); myWarpScalar->Delete(); @@ -140,9 +147,6 @@ Plot3d_Actor::Plot3d_Actor() myRealBounds[3] = VTK_DOUBLE_MIN; myRealBounds[4] = VTK_DOUBLE_MAX; myRealBounds[5] = VTK_DOUBLE_MIN; - - // Degree of the value scale factor (value = value_base * 10^degree) - myValueScaleFactorDegree = 0; } //============================================================================= @@ -346,6 +350,14 @@ void Plot3d_Actor::Build( const int theNX, const double theMaxValue, const int theValueScaleFactorDegree ) { + myNX = theNX; + myNY = theNY; + myPntList = thePntList; + myValueList = theValueList; + myMinValue = theMinValue; + myMaxValue = theMaxValue; + myValueScaleFactorDegree = theValueScaleFactorDegree; + myRealBounds[0] = VTK_DOUBLE_MAX; myRealBounds[1] = VTK_DOUBLE_MIN; myRealBounds[2] = VTK_DOUBLE_MAX; @@ -353,8 +365,6 @@ void Plot3d_Actor::Build( const int theNX, myRealBounds[4] = theMinValue; myRealBounds[5] = theMaxValue; - myValueScaleFactorDegree = theValueScaleFactorDegree; - vtkPolyData* aPointSet = vtkPolyData::New(); aPointSet->Allocate( ( theNX - 1 ) * ( theNY - 1 ) ); @@ -569,6 +579,42 @@ void Plot3d_Actor::RecomputeLookupTable() myScalarBarActor->SetLookupTable( myLookupTable ); } +//============================================================================= +// Function : SetObjectName +// Purpose : +//============================================================================= +void Plot3d_Actor::SetObjectName( const QString& theObjectName ) +{ + myObjectName = theObjectName; +} + +//============================================================================= +// Function : GetObjectName +// Purpose : +//============================================================================= +const QString& Plot3d_Actor::GetObjectName() const +{ + return myObjectName; +} + +//============================================================================= +// Function : SetQuantityName +// Purpose : +//============================================================================= +void Plot3d_Actor::SetQuantityName( const QString& theQuantityName ) +{ + myQuantityName = theQuantityName; +} + +//============================================================================= +// Function : GetQuantityName +// Purpose : +//============================================================================= +const QString& Plot3d_Actor::GetQuantityName() const +{ + return myQuantityName; +} + //============================================================================= // Function : SetUnits // Purpose : @@ -582,7 +628,7 @@ void Plot3d_Actor::SetUnits( const QString& theUnits ) // Function : GetUnits // Purpose : //============================================================================= -QString Plot3d_Actor::GetUnits() const +const QString& Plot3d_Actor::GetUnits() const { return myUnits; } @@ -653,12 +699,3 @@ void Plot3d_Actor::GetRealBounds( double theBounds[6] ) const theBounds[4] = myRealBounds[4]; theBounds[5] = myRealBounds[5]; } - -//============================================================================= -// Function : GetValueScaleFactorDegree -// Purpose : -//============================================================================= -int Plot3d_Actor::GetValueScaleFactorDegree() const -{ - return myValueScaleFactorDegree; -} diff --git a/src/Plot3d/Plot3d_Actor.h b/src/Plot3d/Plot3d_Actor.h index 53936636d..40fac912a 100644 --- a/src/Plot3d/Plot3d_Actor.h +++ b/src/Plot3d/Plot3d_Actor.h @@ -86,10 +86,24 @@ public: const double theMaxValue, const int theValueScaleFactorDegree ); + int GetNX() const { return myNX; } + int GetNY() const { return myNY; } + const QList& GetPntList() const { return myPntList; } + const QList& GetValueList() const { return myValueList; } + double GetMinValue() const { return myMinValue; } + double GetMaxValue() const { return myMaxValue; } + int GetValueScaleFactorDegree() const { return myValueScaleFactorDegree; } + void RecomputeLookupTable(); + void SetObjectName( const QString& ); + const QString& GetObjectName() const; + + void SetQuantityName( const QString& ); + const QString& GetQuantityName() const; + void SetUnits( const QString& ); - QString GetUnits() const; + const QString& GetUnits() const; void SetIsDistance( const bool ); bool GetIsDistance() const; @@ -101,9 +115,15 @@ public: void GetRealBounds( double theBounds[6] ) const; - int GetValueScaleFactorDegree() const; - protected: + int myNX; + int myNY; + QList myPntList; + QList myValueList; + double myMinValue; + double myMaxValue; + int myValueScaleFactorDegree; + vtkSmartPointer myWarpScalar; vtkSmartPointer myImplicitBoolean; @@ -122,6 +142,8 @@ protected: vtkSmartPointer myScalarBarWg; bool myToDisplayScalarBar; + QString myObjectName; + QString myQuantityName; QString myUnits; bool myIsDistance; @@ -129,8 +151,6 @@ protected: int myEndPoint; double myRealBounds[6]; - - int myValueScaleFactorDegree; }; #endif -- 2.39.2