+
+ // Initialize the combobox in the dialog with the list of available reference images
+ aPanel->setPrsPointDataList( aPrsPointDataList );
+ // Select the current reference image in the dialog combobox
+ aPanel->setRefImageName( aRefImageName );
+}
+
+void HYDROGUI_ImportImageOp::setPresentationTrsfPoints( HYDROGUI_PrsImage* thePrs,
+ bool theIsByTwoPoints,
+ const QPoint theLocalPointA,
+ const QPoint theLocalPointB,
+ const QPoint theLocalPointC )
+{
+ // Set transformation points A,B,C to the image presentation
+ if( thePrs )
+ {
+ HYDROGUI_PrsImage::TransformationPointMap aPointMap =
+ thePrs->getTransformationPointMap();
+ if( !aPointMap.isEmpty() )
+ {
+ aPointMap[ HYDROGUI_PrsImage::PointA ].Point = theLocalPointA;
+ aPointMap[ HYDROGUI_PrsImage::PointB ].Point = theLocalPointB;
+ if ( !theIsByTwoPoints )
+ aPointMap[ HYDROGUI_PrsImage::PointC ].Point = theLocalPointC;
+
+ thePrs->setIsByTwoPoints( theIsByTwoPoints );
+ thePrs->setTransformationPointMap( aPointMap );
+ }
+ }
+}
+
+void HYDROGUI_ImportImageOp::computeTrsfData( HYDROData_Image::TransformationMode theTrsfMode,
+ bool theIsByTwoPoints,
+ const QPoint& theLocalPointA,
+ const QPoint& theLocalPointB,
+ const QPoint& theLocalPointC,
+ const QPointF& theGlobalPointA,
+ const QPointF& theGlobalPointB,
+ const QPointF& theGlobalPointC,
+ HYDROGUI_ImportImageDlg::TransformationDataMap& theDataMap ) const
+{
+ // Build the local-global points map
+ HYDROGUI_ImportImageDlg::TransformationDataMap aDataMap;
+ theDataMap[ HYDROGUI_PrsImage::PointA ] =
+ HYDROGUI_ImportImageDlg::ComputeTrsfData( theTrsfMode, theLocalPointA, theGlobalPointA );
+ theDataMap[ HYDROGUI_PrsImage::PointB ] =
+ HYDROGUI_ImportImageDlg::ComputeTrsfData( theTrsfMode, theLocalPointB, theGlobalPointB );
+ if ( !theIsByTwoPoints )
+ {
+ theDataMap[ HYDROGUI_PrsImage::PointC ] =
+ HYDROGUI_ImportImageDlg::ComputeTrsfData( theTrsfMode, theLocalPointC, theGlobalPointC );
+ }