Salome HOME
Merge from BR_V5_DEV 16Feb09
[modules/visu.git] / src / VVTK / VVTK_ImageWriter.cxx
index a411c0e291eb359af40b4a83cc7e7528521ab67b..463eba43de9d905f4eca997fe7c55c9a4b662c6f 100755 (executable)
@@ -1,34 +1,35 @@
-//  SALOME VTKViewer : build VTK viewer into Salome desktop
+//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-//  This library is free software; you can redistribute it and/or 
-//  modify it under the terms of the GNU Lesser General Public 
-//  License as published by the Free Software Foundation; either 
-//  version 2.1 of the License. 
-// 
-//  This library is distributed in the hope that it will be useful, 
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-//  Lesser General Public License for more details. 
-// 
-//  You should have received a copy of the GNU Lesser General Public 
-//  License along with this library; if not, write to the Free Software 
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-// 
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
 //
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
 //
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+//  SALOME VTKViewer : build VTK viewer into Salome desktop
 //  File   :
 //  Author :
 //  Module :
 //  $Header$
-
+//
 #include "VVTK_ImageWriter.h"
 
-#include <qsemaphore.h>
+#include <QSemaphore>
+
+#include "utilities.h"
 
 #include <vtkImageData.h>
 #include <vtkImageClip.h>
@@ -61,7 +62,7 @@ VVTK_ImageWriter
 VVTK_ImageWriter
 ::~VVTK_ImageWriter()
 {
-  if(MYDEBUG) cout<<"VVTK_ImageWriter::~VVTK_ImageWriter - this = "<<this<<endl;
+  if(MYDEBUG) MESSAGE("VVTK_ImageWriter::~VVTK_ImageWriter - this = "<<this);
 }
 
 
@@ -104,10 +105,10 @@ VVTK_ImageWriter
   aWriter->Delete();
   myImageData->Delete();
 
-  if(MYDEBUG) cout<<"VVTK_ImageWriter::run "<<
+  if(MYDEBUG) MESSAGE("VVTK_ImageWriter::run "<<
                "- this = "<<this<<
-               "; total = "<<mySemaphore->total()<<
-               "; available = "<<mySemaphore->available()<<endl;
-  *mySemaphore -= 1;
+               //"; total = "<<mySemaphore->total()<<
+               "; available = "<<mySemaphore->available() );
+  mySemaphore->release();
 }