#include "HYDROData_Image.h"
#include "HYDROData_Document.h"
-#include "HYDROData_Tool.h"
+#include "HYDROData_Lambert93.h"
#include "HYDROData_OperationsFactory.h"
#include <TDataStd_RealArray.hxx>
#include <TDataStd_Integer.hxx>
#include <TDataStd_IntegerArray.hxx>
#include <TDataStd_ReferenceList.hxx>
-#include <TDataStd_Name.hxx>
#include <TDataStd_UAttribute.hxx>
#include <TDataStd_AsciiString.hxx>
#include <ImageComposer_MetaTypes.h>
#include <QStringList>
+#include <QFile>
+
+#include <boost/math/special_functions/fpclassify.hpp>
-static const Standard_GUID GUID_MUST_BE_UPDATED("80f2bb81-3873-4631-8ddd-940d2119f000");
static const Standard_GUID GUID_SELF_SPLITTED("997995aa-5c19-40bf-9a60-ab4b70ad04d8");
static const Standard_GUID GUID_HAS_LOCAL_POINTS("FD8841AA-FC44-42fa-B6A7-0F682CCC6F27");
static const Standard_GUID GUID_HAS_GLOBAL_POINTS("330D0E81-742D-4ea3-92D4-484877CFA7C1");
-#define PYTHON_IMAGE_ID "KIND_IMAGE"
-
IMPLEMENT_STANDARD_HANDLE(HYDROData_Image, HYDROData_Entity)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Image, HYDROData_Entity)
QStringList HYDROData_Image::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList;
-
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this );
- if ( aDocument.IsNull() )
- return aResList;
-
- QString aDocName = aDocument->GetDocPyName();
- QString anImageName = GetName();
-
- aResList << QString( "%1 = %2.CreateObject( %3 );" )
- .arg( anImageName ).arg( aDocName ).arg( PYTHON_IMAGE_ID );
- aResList << QString( "%1.SetName( \"%2\" );" )
- .arg( anImageName ).arg( anImageName );
+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
+ QString anImageName = GetObjPyName();
QString aFilePath = GetFilePath();
if ( !aFilePath.isEmpty() )
// Dump transformation points for image
- QString aGap = QString().fill( ' ', anImageName.size() + 16 );
-
bool anIsByTwoPoints = IsByTwoPoints();
QPoint aLocalPointA, aLocalPointB, aLocalPointC;
if ( GetLocalPoints( aLocalPointA, aLocalPointB, aLocalPointC ) )
{
+ QString aGap = QString().fill( ' ', anImageName.size() + 17 );
+
aResList << QString( "%1.SetLocalPoints( QPoint( %2, %3 )," )
.arg( anImageName ).arg( aLocalPointA.x() ).arg( aLocalPointA.y() );
- aResList << QString( aGap + "QPoint( %1, %2 )," )
+ aResList << QString( aGap + "QPoint( %1, %2 )" )
.arg( aLocalPointB.x() ).arg( aLocalPointB.y() );
- aResList << QString( aGap + "QPoint( %1, %2 ) );" )
- .arg( aLocalPointC.x() ).arg( aLocalPointC.y() );
+ if ( !anIsByTwoPoints )
+ {
+ aResList.last().append( "," );
+ aResList << QString( aGap + "QPoint( %1, %2 ) );" )
+ .arg( aLocalPointC.x() ).arg( aLocalPointC.y() );
+ }
+ else
+ {
+ aResList.last().append( " );" );
+ }
aResList << QString( "" );
}
QPointF aTrsfPointA, aTrsfPointB, aTrsfPointC;
if ( GetGlobalPoints( aTransformationMode, aTrsfPointA, aTrsfPointB, aTrsfPointC ) )
{
+ QString aGap = QString().fill( ' ', anImageName.size() + 18 );
+
aResList << QString( "%1.SetGlobalPoints( %2," )
.arg( anImageName ).arg( aTransformationMode );
aResList << QString( aGap + "QPointF( %1, %2 )," )
.arg( aTrsfPointA.x() ).arg( aTrsfPointA.y() );
- aResList << QString( aGap + "QPointF( %1, %2 )," )
+ aResList << QString( aGap + "QPointF( %1, %2 )" )
.arg( aTrsfPointB.x() ).arg( aTrsfPointB.y() );
- aResList << QString( aGap + "QPointF( %1, %2 ) );" )
- .arg( aTrsfPointC.x() ).arg( aTrsfPointC.y() );
+ if ( !anIsByTwoPoints )
+ {
+ aResList.last().append( "," );
+ aResList << QString( aGap + "QPointF( %1, %2 ) );" )
+ .arg( aTrsfPointC.x() ).arg( aTrsfPointC.y() );
+ }
+ else
+ {
+ aResList.last().append( " );" );
+ }
if ( aTransformationMode == ReferenceImage )
{
aResList << QString( "%1.SetOperatorName( \"%2\" );" )
.arg( anImageName ).arg( anOperatorName );
- ImageComposer_Operator* anImageOp = HYDROData_OperationsFactory::Factory()->Operator( this );
+ ImageComposer_Operator* anImageOp =
+ HYDROData_OperationsFactory::Factory()->Operator( OperatorName() );
if ( anImageOp )
{
// Dump operation arguments
setPythonReferenceObject( theTreatedObjects, aResList, aRefImg, "AppendReference" );
}
}
-
- // Necessary to update image in case of composed operator
- aResList << QString( "" );
- aResList << QString( "%1.Update( False );" ).arg( anImageName );
}
+ aResList << QString( "" );
+ aResList << QString( "%1.Update();" ).arg( anImageName );
+
return aResList;
}
-void HYDROData_Image::Update( const bool theIsForce )
+void HYDROData_Image::Update()
{
+ bool anIsToUpdate = IsMustBeUpdated();
+
+ HYDROData_Entity::Update();
+
+ if ( !anIsToUpdate )
+ return;
+
HYDROData_OperationsFactory* aFactory = HYDROData_OperationsFactory::Factory();
- // Update image only if there is an operation
ImageComposer_Operator* anOp = aFactory->Operator( OperatorName() );
- if ( anOp )
+ if ( anOp ) // Update image if there is an operation
{
// Fill by arguments and process the operation
+ anOp->setBinArgs( Args() );
+
QVariant anObj1, anObj2;
int aNbReferences = NbReferences();
ImageComposer_Image aResImg = anOp->process( anObj1, anObj2 );
SetImage( aResImg );
+ SetTrsf( aResImg.transform() );
}
-
- if ( theIsForce )
+ else // Update image if it positioned relatively to other image
{
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this );
- if ( !aDocument.IsNull() )
- {
- // Change the states of this and all depended images
- MustBeUpdated( true );
- HYDROData_Tool::SetMustBeUpdatedImages( aDocument );
- MustBeUpdated( false );
- }
+ UpdateTrsf();
}
+
+ SetToUpdate( false );
}
QVariant HYDROData_Image::GetDataVariant()
return aVarData;
}
+HYDROData_SequenceOfObjects HYDROData_Image::GetAllReferenceObjects() const
+{
+ HYDROData_SequenceOfObjects aResSeq = HYDROData_Entity::GetAllReferenceObjects();
+
+ Handle(HYDROData_Image) aRefImage = GetTrsfReferenceImage();
+ if ( !aRefImage.IsNull() )
+ aResSeq.Append( aRefImage );
+
+ HYDROData_SequenceOfObjects aSeqRefObjects = GetReferenceObjects( 0 );
+ aResSeq.Append( aSeqRefObjects );
+
+ return aResSeq;
+}
+
void HYDROData_Image::SetImage(const QImage& theImage)
{
- if (theImage.isNull()) {
+ if ( theImage.isNull() )
+ {
// for empty image remove all previously stored attributes
myLab.ForgetAttribute(TDataStd_IntegerArray::GetID());
myLab.ForgetAttribute(TDataStd_ByteArray::GetID());
- return;
}
- // store width, height, bytes per line and format in integer array
- Handle(TDataStd_IntegerArray) aParams;
- if (!myLab.FindAttribute(TDataStd_IntegerArray::GetID(), aParams)) {
- aParams = TDataStd_IntegerArray::Set(myLab, 1, 4);
+ else
+ {
+ QImage anImage;
+
+ // convert 8-bits images
+ if ( theImage.format() == QImage::Format_Indexed8 ) {
+ anImage = theImage.convertToFormat( QImage::Format_RGB32 );
+ } else {
+ anImage = theImage;
+ }
+
+ // store width, height, bytes per line and format in integer array
+ Handle(TDataStd_IntegerArray) aParams;
+ if (!myLab.FindAttribute(TDataStd_IntegerArray::GetID(), aParams)) {
+ aParams = TDataStd_IntegerArray::Set(myLab, 1, 4);
+ }
+ aParams->SetValue(1, anImage.width());
+ aParams->SetValue(2, anImage.height());
+ aParams->SetValue(3, anImage.bytesPerLine());
+ aParams->SetValue(4, (int)(anImage.format()));
+ // store data of image in byte array
+ const char* aData = (const char*)(anImage.bits());
+ SaveByteArray(0, aData, anImage.byteCount());
}
- aParams->SetValue(1, theImage.width());
- aParams->SetValue(2, theImage.height());
- aParams->SetValue(3, theImage.bytesPerLine());
- aParams->SetValue(4, (int)(theImage.format()));
- // store data of image in byte array
- const char* aData = (const char*)(theImage.bits());
- SaveByteArray(0, aData, theImage.byteCount());
+
+ SetToUpdate( true );
}
-bool HYDROData_Image::LoadImage(const QString& theFilePath)
+bool HYDROData_Image::LoadImage( const QString& theFilePath )
{
QImage anImage( theFilePath );
SetImage( anImage );
+
+ SetFilePath( theFilePath );
+
return !anImage.isNull();
}
return aResult;
}
-void HYDROData_Image::SetFilePath(const QString& theFilePath)
+void HYDROData_Image::SetFilePath( const QString& theFilePath )
{
TCollection_AsciiString anAsciiStr( theFilePath.toStdString().c_str() );
TDataStd_AsciiString::Set( myLab.FindChild( DataTag_FilePath ), anAsciiStr );
+
+ SetToUpdate( true );
}
QString HYDROData_Image::GetFilePath() const
{
QString aRes;
- Handle(TDataStd_AsciiString) anAsciiStr;
- if ( myLab.FindChild( DataTag_FilePath ).FindAttribute( TDataStd_AsciiString::GetID(), anAsciiStr ) )
- aRes = QString( anAsciiStr->Get().ToCString() );
+ TDF_Label aLabel = myLab.FindChild( DataTag_FilePath, false );
+ if ( !aLabel.IsNull() )
+ {
+ Handle(TDataStd_AsciiString) anAsciiStr;
+ if ( aLabel.FindAttribute( TDataStd_AsciiString::GetID(), anAsciiStr ) )
+ aRes = QString( anAsciiStr->Get().ToCString() );
+ }
return aRes;
}
anArray->SetValue(7, theTrsf.m31());
anArray->SetValue(8, theTrsf.m32());
anArray->SetValue(9, theTrsf.m33());
+
+ SetToUpdate( true );
}
QTransform HYDROData_Image::Trsf() const
aRefTransform = aRefImage->Trsf();
}
+ bool anIsByTwoPoints = IsByTwoPoints();
+
+ // Convert lambert coordinates to cartesian
+ if ( aTrsfMode == ManualGeodesic )
+ {
+ double aXCart = 0, aYCart = 0;
+
+ HYDROData_Lambert93::toXY( aTrsfPointA.y(), aTrsfPointA.x(), aXCart, aYCart );
+ aTrsfPointA = QPointF( aXCart, aYCart );
+
+ HYDROData_Lambert93::toXY( aTrsfPointB.y(), aTrsfPointB.x(), aXCart, aYCart );
+ aTrsfPointB = QPointF( aXCart, aYCart );
+
+ if ( !anIsByTwoPoints )
+ {
+ HYDROData_Lambert93::toXY( aTrsfPointC.y(), aTrsfPointC.x(), aXCart, aYCart );
+ aTrsfPointC = QPointF( aXCart, aYCart );
+ }
+ }
+
// generate third points if needed
- if ( IsByTwoPoints() )
+ if ( anIsByTwoPoints )
{
aPointC = generateThirdPoint( aPointA, aPointB, true ).toPoint();
aTrsfPointC = generateThirdPoint( aTrsfPointA, aTrsfPointB, anIsRefImage );
if( !anIsInvertible )
return;
- QTransform aResTransform;
+ QTransform aResTransform = aTransform1Inverted * aTransform2;
if( anIsRefImage )
- aResTransform = aTransform1Inverted * aTransform2 * aRefTransform;
- else
- aResTransform = aTransform1Inverted * aTransform2;
+ aResTransform *= aRefTransform;
SetTrsf( aResTransform );
}
return aPointC.x() < 0 && aPointC.y() < 0;
}
+bool HYDROData_Image::HasReferences() const
+{
+ Handle(HYDROData_Image) aRefImage = GetTrsfReferenceImage();
+ int aNbReferences = NbReferences();
+
+ return !aRefImage.IsNull() || aNbReferences > 0;
+}
+
+void HYDROData_Image::RemoveAllReferences()
+{
+ if ( !HasReferences() )
+ return;
+
+ Handle(HYDROData_Image) aRefImage = GetTrsfReferenceImage();
+ if ( !aRefImage.IsNull() )
+ {
+ RemoveTrsfReferenceImage();
+ }
+ else
+ {
+ ClearReferences();
+ SetOperatorName( "" );
+ SetArgs( "" );
+ SetIsSelfSplitted( false );
+ }
+
+ bool anIsByTwoPoints = IsByTwoPoints();
+
+ QImage anImage = Image();
+ if ( anImage.isNull() )
+ {
+ SetToUpdate( false );
+ return;
+ }
+
+ // Set local points to default position
+ QPoint aLocalPointA = QPoint( 0, 0 );
+ QPoint aLocalPointB = QPoint( anImage.width(), 0 );
+ QPoint aLocalPointC = anIsByTwoPoints ? QPoint( INT_MIN, INT_MIN ) : QPoint( 0, anImage.height() );
+
+ SetLocalPoints( aLocalPointA, aLocalPointB, aLocalPointC, false );
+
+ // Calculate global points
+ QTransform aTransform = Trsf();
+
+ QPointF aTrsfPointA = QPointF( aTransform.map( aLocalPointA ) );
+ QPointF aTrsfPointB = QPointF( aTransform.map( aLocalPointB ) );
+ QPointF aTrsfPointC = anIsByTwoPoints ? QPointF( INT_MIN, INT_MIN ) :
+ QPointF( aTransform.map( aLocalPointC ) );
+
+ SetGlobalPoints( ManualCartesian, aTrsfPointA, aTrsfPointB, aTrsfPointC );
+
+ SetToUpdate( false );
+}
+
void HYDROData_Image::SetLocalPoints( const QPoint& thePointA,
const QPoint& thePointB,
- const QPoint& thePointC )
+ const QPoint& thePointC,
+ const bool theIsUpdate )
{
Handle(TDataStd_RealArray) anArray;
if ( !myLab.FindChild( DataTag_TrsfPoints ).FindAttribute( TDataStd_RealArray::GetID(), anArray ) )
TDataStd_UAttribute::Set( myLab.FindChild( DataTag_TrsfPoints ), GUID_HAS_LOCAL_POINTS );
- UpdateTrsf();
+ if ( theIsUpdate )
+ UpdateTrsf();
+
+ SetToUpdate( true );
}
bool HYDROData_Image::GetLocalPoints( QPoint& thePointA,
void HYDROData_Image::SetGlobalPoints( const TransformationMode& theMode,
const QPointF& thePointA,
const QPointF& thePointB,
- const QPointF& thePointC )
+ const QPointF& thePointC,
+ const bool theIsUpdate )
{
Handle(TDataStd_RealArray) anArray;
if ( !myLab.FindChild( DataTag_TrsfPoints ).FindAttribute( TDataStd_RealArray::GetID(), anArray ) )
TDataStd_UAttribute::Set( myLab.FindChild( DataTag_TrsfPoints ), GUID_HAS_GLOBAL_POINTS );
- UpdateTrsf();
+ if ( theIsUpdate )
+ UpdateTrsf();
- /*
- if( anIsRefImage )
- {
- aCPointA = QPointF( aTransform.map( aPointA ) );
- aCPointB = QPointF( aTransform.map( aPointB ) );
- aCPointC = QPointF( aTransform.map( aPointC ) );
-
- // compute Lambert93 points
- xca = aCPointA.x();
- yca = aCPointA.y();
- xcb = aCPointB.x();
- ycb = aCPointB.y();
- xcc = aCPointC.x();
- ycc = aCPointC.y();
-
- double xla = 0, yla = 0, xlb = 0, ylb = 0, xlc = 0, ylc = 0;
- HYDROData_Lambert93::toGeo( xca, yca, yla, xla );
- HYDROData_Lambert93::toGeo( xcb, ycb, ylb, xlb );
- HYDROData_Lambert93::toGeo( xcc, ycc, ylc, xlc );
-
- aLPointA = QPointF( xla * 3600.0, yla * 3600.0 ); // convert degrees to seconds
- aLPointB = QPointF( xlb * 3600.0, ylb * 3600.0 ); // convert degrees to seconds
- aLPointC = QPointF( xlc * 3600.0, ylc * 3600.0 ); // convert degrees to seconds
- }
- */
+ SetToUpdate( true );
}
bool HYDROData_Image::GetGlobalPoints( TransformationMode& theMode,
return true;
}
+bool HYDROData_Image::SetGlobalPointsFromFile( const QString& theFileName )
+{
+ bool aRes = false;
+
+ // Try to open the file
+ QFile aFile( theFileName );
+ if ( !aFile.exists() || !aFile.open( QIODevice::ReadOnly ) ) {
+ return aRes;
+ }
+
+ QPointF aPointA, aPointB;
+ double aXmin, anYmin, aXmax, anYmax;
+ aXmin = anYmin = aXmax = anYmax = -1;
+
+ while ( !aFile.atEnd() &&
+ ( aXmin < 0 || anYmin < 0 || aXmax < 0 || anYmax < 0 ) ) {
+ // Read line
+ QString aLine = aFile.readLine().simplified();
+ aLine.replace( " ", "" );
+ if ( aLine.isEmpty() ) {
+ continue;
+ }
+
+ // Try to read double value after ":"
+ bool isDoubleOk = false;
+ double aDoubleValue = -1;
+ QStringList aValues = aLine.split( ":", QString::SkipEmptyParts );
+ if ( aValues.count() == 2 ) {
+ aDoubleValue = aValues.last().toDouble( &isDoubleOk );
+ }
+
+ // Check the result
+ if ( !isDoubleOk ||
+ boost::math::isnan( aDoubleValue ) ||
+ boost::math::isinf( aDoubleValue ) ) {
+ continue;
+ }
+
+ // Set the value
+ if ( aLine.startsWith( "Xminimum" ) ) {
+ aXmin = aDoubleValue;
+ }
+ else if ( aLine.startsWith( "Yminimum" ) ) {
+ anYmin = aDoubleValue;
+ }
+ else if ( aLine.startsWith( "Xmaximum" ) ) {
+ aXmax = aDoubleValue;
+ }
+ else if ( aLine.startsWith( "Ymaximum" ) ) {
+ anYmax = aDoubleValue;
+ }
+ }
+
+ // Close the file
+ aFile.close();
+
+ if ( aXmin >= 0 && anYmin >= 0 ) {
+ aPointA.setX( aXmin );
+ aPointA.setY( anYmin );
+ }
+
+ if ( aXmax >= 0 && anYmax >= 0 ) {
+ aPointB.setX( aXmax );
+ aPointB.setY( anYmax );
+ }
+
+ if ( !aPointA.isNull() && !aPointB.isNull() ) {
+ SetGlobalPoints( ManualCartesian, aPointA, aPointB );
+ aRes = true;
+ }
+
+ return aRes;
+}
+
bool HYDROData_Image::HasGlobalPoints() const
{
TDF_Label aLabel = myLab.FindChild( DataTag_TrsfPoints, false );
void HYDROData_Image::SetReferencePoints( const Handle(HYDROData_Image)& theRefImage,
const QPointF& thePointA,
const QPointF& thePointB,
- const QPointF& thePointC )
+ const QPointF& thePointC,
+ const bool theIsUpdate )
{
SetTrsfReferenceImage( theRefImage );
- SetGlobalPoints( ReferenceImage, thePointA, thePointB, thePointC );
-
- UpdateTrsf();
+ SetGlobalPoints( ReferenceImage, thePointA, thePointB, thePointC, theIsUpdate );
}
bool HYDROData_Image::GetReferencePoints( Handle(HYDROData_Image)& theRefImage,
void HYDROData_Image::SetTrsfMode( const TransformationMode& theMode )
{
TDataStd_Integer::Set( myLab.FindChild( DataTag_TrsfMode ), (int)theMode );
+ SetToUpdate( true );
}
HYDROData_Image::TransformationMode HYDROData_Image::GetTrsfMode() const
{
- TransformationMode aResMode = ManualLambert;
+ TransformationMode aResMode = ManualGeodesic;
TDF_Label aLabel = myLab.FindChild( DataTag_TrsfPoints, false );
if ( !aLabel.IsNull() )
void HYDROData_Image::SetTrsfReferenceImage( const Handle(HYDROData_Image)& theRefImage )
{
SetReferenceObject( theRefImage, DataTag_TrsfImage );
+ SetToUpdate( true );
}
Handle(HYDROData_Image) HYDROData_Image::GetTrsfReferenceImage() const
return Handle(HYDROData_Image)::DownCast( GetReferenceObject( DataTag_TrsfImage ) );
}
+void HYDROData_Image::RemoveTrsfReferenceImage()
+{
+ RemoveReferenceObject( DataTag_TrsfImage );
+ SetToUpdate( true );
+}
+
void HYDROData_Image::AppendReference( const Handle(HYDROData_Entity)& theReferenced )
{
AddReferenceObject( theReferenced, 0 );
+ SetToUpdate( true );
}
int HYDROData_Image::NbReferences() const
const int theIndex, Handle(HYDROData_Entity) theReferenced)
{
SetReferenceObject( theReferenced, 0, theIndex );
+ SetToUpdate( true );
}
void HYDROData_Image::RemoveReference(const int theIndex)
{
RemoveReferenceObject( 0, theIndex );
+ SetToUpdate( true );
}
void HYDROData_Image::ClearReferences()
{
ClearReferenceObjects( 0 );
+ SetToUpdate( true );
}
-void HYDROData_Image::SetOperatorName(const QString theOpName)
+void HYDROData_Image::SetOperatorName( const QString theOpName )
{
- TDataStd_Name::Set(myLab.FindChild(DataTag_Operator),
- TCollection_ExtendedString(theOpName.toLatin1().constData()));
+ TCollection_AsciiString anAsciiStr( theOpName.toStdString().c_str() );
+ TDataStd_AsciiString::Set( myLab.FindChild( DataTag_Operator ), anAsciiStr );
+ SetToUpdate( true );
}
QString HYDROData_Image::OperatorName() const
{
- Handle(TDataStd_Name) aName;
- if (myLab.FindChild(DataTag_Operator).
- FindAttribute(TDataStd_Name::GetID(), aName)) {
- TCollection_AsciiString aStr(aName->Get());
- return QString(aStr.ToCString());
+ QString aRes;
+
+ TDF_Label aLabel = myLab.FindChild( DataTag_Operator, false );
+ if ( !aLabel.IsNull() )
+ {
+ Handle(TDataStd_AsciiString) anAsciiStr;
+ if ( aLabel.FindAttribute( TDataStd_AsciiString::GetID(), anAsciiStr ) )
+ aRes = QString( anAsciiStr->Get().ToCString() );
}
- return QString();
+
+ return aRes;
}
void HYDROData_Image::SetArgs(const QByteArray& theArgs)
{
SaveByteArray(DataTag_Operator, theArgs.constData(), theArgs.length());
+ SetToUpdate( true );
}
QByteArray HYDROData_Image::Args() const
return QByteArray(aData, aLen);
}
-void HYDROData_Image::MustBeUpdated(bool theFlag)
-{
- if (theFlag) {
- TDataStd_UAttribute::Set(myLab, GUID_MUST_BE_UPDATED);
- } else {
- myLab.ForgetAttribute(GUID_MUST_BE_UPDATED);
- }
-}
-
-bool HYDROData_Image::MustBeUpdated() const
-{
- return myLab.IsAttribute(GUID_MUST_BE_UPDATED);
-}
-
void HYDROData_Image::SetIsSelfSplitted(bool theFlag)
{
if (theFlag) {
} else {
myLab.ForgetAttribute(GUID_SELF_SPLITTED);
}
+ SetToUpdate( true );
}
bool HYDROData_Image::IsSelfSplitted() const
const bool& theIsLocal ) const
{
// Rotate vector to 90 degrees : clockwise - for local
- // anticlockwise - for global
+ // counterclockwise - for global
const double aTheta = theIsLocal ? -M_PI_2 : M_PI_2;
QPointF aResPoint;