Salome HOME
Merge remote-tracking branch 'origin/BR_1321_ECW' into BR_DEMO
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ImportImageOp.cxx
index 15c73fdecb3b1ce405a5f5bcad2abc2dea9d841c..eef9bd9a7a4dc810fff8fbc9e7962e50ea98dd41 100644 (file)
@@ -85,7 +85,7 @@ void HYDROGUI_ImportImageOp::startOperation()
       myEditedObject->GetLocalPoints( aLocalPointA, aLocalPointB, aLocalPointC );
 
       // Create the edited image preview presentation in the viewer
-      onCreatePreview( anImage );
+      onCreatePreview( anImage, NULL ); //TODO
 
       // Set transformation local points A,B,C to the image preview presentation
       setPresentationTrsfPoints( myPreviewPrs, anIsByTwoPoints, aLocalPointA, 
@@ -268,7 +268,8 @@ void HYDROGUI_ImportImageOp::commitOperation()
 HYDROGUI_InputPanel* HYDROGUI_ImportImageOp::createInputPanel() const
 {
   HYDROGUI_InputPanel* aPanel = new HYDROGUI_ImportImageDlg( module(), getName() );
-  connect( aPanel, SIGNAL( createPreview( QImage ) ), SLOT( onCreatePreview( QImage ) ) );
+  connect( aPanel, SIGNAL( createPreview( QImage, HYDROData_Image::ECW_FileInfo* ) ), 
+    SLOT( onCreatePreview( QImage, HYDROData_Image::ECW_FileInfo* ) ) );
   connect( aPanel, SIGNAL( activatePointSelection( int ) ), SLOT( onActivatePointSelection( int ) ) );
   connect( aPanel, SIGNAL( pointCoordChanged( bool, int, bool, int ) ), 
                      SLOT( onPointCoordChanged( bool, int, bool, int ) ) );
@@ -589,7 +590,7 @@ void HYDROGUI_ImportImageOp::apply()
   }
 }
 
-void HYDROGUI_ImportImageOp::onCreatePreview( QImage theImage )
+void HYDROGUI_ImportImageOp::onCreatePreview( QImage theImage, HYDROData_Image::ECW_FileInfo* theFileInfo )
 {
   HYDROGUI_ImportImageDlg* aPanel = (HYDROGUI_ImportImageDlg*)inputPanel();
 
@@ -688,7 +689,10 @@ void HYDROGUI_ImportImageOp::onCreatePreview( QImage theImage )
 
   aPanel->setImageSize( myImage.size() );
 
-  aPanel->initializePointSelection();
+  if (!theFileInfo)
+    aPanel->initializePointSelection();
+  else
+     aPanel->ECW_initializePointSelection(theFileInfo);
   onPointSelected( false );
   onSetCIsUsed( !aPanel->isByTwoPoints() );
 }