+ Handle(TDataStd_RealArray) anArray;
+ if ( !myLab.FindChild( DataTag_TrsfPoints ).FindAttribute( TDataStd_RealArray::GetID(), anArray ) )
+ anArray = TDataStd_RealArray::Set( myLab.FindChild( DataTag_TrsfPoints ), 1, 12 );
+
+ anArray->SetValue( 7, thePointA.x() );
+ anArray->SetValue( 8, thePointA.y() );
+ anArray->SetValue( 9, thePointB.x() );
+ anArray->SetValue( 10, thePointB.y() );
+ anArray->SetValue( 11, thePointC.x() );
+ anArray->SetValue( 12, thePointC.y() );
+
+ SetTrsfMode( theMode );
+
+ TDataStd_UAttribute::Set( myLab.FindChild( DataTag_TrsfPoints ), GUID_HAS_GLOBAL_POINTS );
+
+ if ( theIsUpdate )
+ UpdateTrsf();
+
+ SetToUpdate( true );
+}
+
+bool HYDROData_Image::GetGlobalPoints( TransformationMode& theMode,
+ QPointF& thePointA,
+ QPointF& thePointB,
+ QPointF& thePointC ) const
+{
+ if ( !HasGlobalPoints() )
+ return false;
+
+ theMode = GetTrsfMode();
+
+ Handle(TDataStd_RealArray) anArray;
+ myLab.FindChild( DataTag_TrsfPoints ).FindAttribute( TDataStd_RealArray::GetID(), anArray );
+
+ thePointA = QPointF( anArray->Value( 7 ), anArray->Value( 8 ) );
+ thePointB = QPointF( anArray->Value( 9 ), anArray->Value( 10 ) );
+ thePointC = QPointF( anArray->Value( 11 ), anArray->Value( 12 ) );
+
+ return true;
+}
+
+bool HYDROData_Image::HasGlobalPoints() const
+{
+ TDF_Label aLabel = myLab.FindChild( DataTag_TrsfPoints, false );
+ if ( aLabel.IsNull() || !aLabel.IsAttribute( GUID_HAS_GLOBAL_POINTS ) )
+ return false;
+
+ Handle(TDataStd_RealArray) anArray;
+ return aLabel.FindAttribute( TDataStd_RealArray::GetID(), anArray );
+}
+
+void HYDROData_Image::SetReferencePoints( const Handle(HYDROData_Image)& theRefImage,
+ const QPointF& thePointA,
+ const QPointF& thePointB,
+ const QPointF& thePointC,
+ const bool theIsUpdate )
+{
+ SetTrsfReferenceImage( theRefImage );
+ SetGlobalPoints( ReferenceImage, thePointA, thePointB, thePointC, theIsUpdate );
+}
+
+bool HYDROData_Image::GetReferencePoints( Handle(HYDROData_Image)& theRefImage,
+ QPointF& thePointA,
+ QPointF& thePointB,
+ QPointF& thePointC ) const
+{
+ if ( !HasReferencePoints() )
+ return false;
+
+ theRefImage = GetTrsfReferenceImage();
+
+ TransformationMode aMode;
+ GetGlobalPoints( aMode, thePointA, thePointB, thePointC );
+
+ return true;