#include "SVTK_ImageWriter.h"
+#include "utilities.h"
+
#include <QSemaphore>
#include <vtkAlgorithm.h>
#include <vtkJPEGWriter.h>
#include <vtkSmartPointer.h>
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
//----------------------------------------------------------------------------
SVTK_ImageWriter
SVTK_ImageWriter
::~SVTK_ImageWriter()
{
- if(MYDEBUG) cout<<"SVTK_ImageWriter::~SVTK_ImageWriter - this = "<<this<<endl;
+ if(SALOME::VerbosityActivated())
+ cout << "SVTK_ImageWriter::~SVTK_ImageWriter - this = " << this << endl;
}
aWriter->Delete();
myImageData->Delete();
- if(MYDEBUG) cout<<"SVTK_ImageWriter::run "<<
- "- this = "<<this<<
- //"; total = "<<mySemaphore->total()<<
- "; available = "<<mySemaphore->available()<<endl;
+ if(SALOME::VerbosityActivated())
+ cout << "SVTK_ImageWriter::run - this = " << this <<
+ //"; total = "<<mySemaphore->total()<<
+ "; available = " << mySemaphore->available() << endl;
+
mySemaphore->release();
}
#include "SVTK_ImageWriterMgr.h"
#include "SVTK_ImageWriter.h"
+#include "utilities.h"
+
#include <vtkAlgorithm.h>
#include <vtkImageData.h>
#include <limits>
-
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
//----------------------------------------------------------------------------
SVTK_ImageWriterMgr
::SVTK_ImageWriterMgr()
int aMax = std::numeric_limits<int>::max() / 2;
mySemaphore = new QSemaphore(aMax);
mySemaphore->acquire( aMax );
- if(MYDEBUG) cout<<"SVTK_ImageWriterMgr::SVTK_ImageWriterMgr "<<
- //"- total = "<<mySemaphore->total()<<
- "; available = "<<mySemaphore->available()<<endl;
+ if(SALOME::VerbosityActivated())
+ cout << "SVTK_ImageWriterMgr::SVTK_ImageWriterMgr; available = " << mySemaphore->available() << endl;
}
SVTK_ImageWriterMgr
::Stop()
{
- if(MYDEBUG) cout<<"SVTK_ImageWriterMgr::Stop "<<
- //"- total = "<<mySemaphore->total()<<
- "; available = "<<mySemaphore->available()<<endl;
- if(MYDEBUG) cout<<"SVTK_ImageWriterMgr::Stop - *mySemaphore += "<<myThreads.size()<<endl;
+ if(SALOME::VerbosityActivated())
+ cout << "SVTK_ImageWriterMgr::Stop " <<
+ //"- total = "<<mySemaphore->total()<<
+ "; available = " << mySemaphore->available() << endl;
+
+ if(SALOME::VerbosityActivated())
+ cout << "SVTK_ImageWriterMgr::Stop - *mySemaphore += " << myThreads.size() << endl;
+
mySemaphore->acquire( (int)myThreads.size() ); //!< TODO: conversion from size_t to int
for(size_t anId = 0, anEnd = myThreads.size(); anId < anEnd; anId++){
#include <QFileInfo>
#include <QDir>
-//#include "utilities.h"
-
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
+#include "utilities.h"
namespace
myPaused = myPaused ? 0 : 1;
if(myPaused && !myFrameIndexes.empty()){
myFrameIndexes.back() *= -1;
- if(MYDEBUG) cout<<"SVTK_Recorder::Pause - myFrameIndexes.back() = "<<myFrameIndexes.back()<<endl;
+
+ if(SALOME::VerbosityActivated())
+ cout << "SVTK_Recorder::Pause - myFrameIndexes.back() = " << myFrameIndexes.back() << endl;
}
}
if(aLastFrameIndex < 0){
myFrameIndexes.back() = abs(myFrameIndexes.back());
double aPauseTime = fabs((double)(aFrameIndex - myFrameIndex - 1)) / myNbFPS;
- if(MYDEBUG)
- cout<<"SVTK_Recorder::DoRecord - aFrameIndex = "<<aFrameIndex<<
- "; aPauseTime = "<<aPauseTime<<endl;
+
+ if(SALOME::VerbosityActivated())
+ cout << "SVTK_Recorder::DoRecord - aFrameIndex = " << aFrameIndex <<
+ "; aPauseTime = " << aPauseTime << endl;
+
myTimeStart += aPauseTime;
}
}
myFrameIndexes.push_back(myFrameIndex);
- if(MYDEBUG) cout<<"SVTK_Recorder::DoRecord - myFrameIndex = "<<myFrameIndex<<endl;
+ if(SALOME::VerbosityActivated())
+ cout << "SVTK_Recorder::DoRecord - myFrameIndex = " << myFrameIndex << endl;
myRenderWindow->RemoveObserver(myCommand);
myFilter->Modified();
}
std::string aString(aStream.str());
system(aString.c_str());
- if(MYDEBUG) cout<<"SVTK_Recorder::AddSkippedFrames - "<<aString<<endl;
+ if(SALOME::VerbosityActivated())
+ cout << "SVTK_Recorder::AddSkippedFrames - " << aString << endl;
}
}
std::string aString(aStream.str());
myErrorStatus = system(aString.c_str());
- if(MYDEBUG) cout<<"SVTK_Recorder::MakeFileAVI - "<<aString<<endl;
+ if(SALOME::VerbosityActivated())
+ cout << "SVTK_Recorder::MakeFileAVI - " << aString << endl;
QFileInfo aFileInfo(myName.c_str());
QString aDirPath = aFileInfo.absoluteDir().path();
") & (for /f %i in (" + tmpFile + ") do (del \"%i\")) & (del " + tmpFile + "))) > NUL";
#endif
- if(MYDEBUG) cout<<"SVTK_Recorder::MakeFileAVI - "<<(const char*)aCommand.toUtf8()<<endl;
+ if(SALOME::VerbosityActivated())
+ cout << "SVTK_Recorder::MakeFileAVI - " << (const char*)aCommand.toUtf8() << endl;
+
system((const char*)aCommand.toUtf8());
}
cellTypesVec[ *type ] = *type;
}
-/* if(MYDEBUG){
+/*
MESSAGE("Execute - anInput->GetNumberOfCells() = "<<anInput->GetNumberOfCells());
MESSAGE("Execute - myCellTypes.size() = "<<myCellTypes.size());
MESSAGE("Execute - myCellIds.size() = "<<myCellIds.size());
MESSAGE("Execute - myExtractionMode = "<<myExtractionMode);
MESSAGE("Execute - myChangeMode = "<<myChangeMode);
- }*/
+*/
vtkIdType aNbElems = 0;
if(myExtractionMode == eCells)
{
myPassAll = true;
TVectorId().swap( myOut2InId );
}
-/* if(MYDEBUG){
+/*
MESSAGE("Execute - anOutput->GetNumberOfCells() = "<<anOutput->GetNumberOfCells());
if(myStoreMapping){
MESSAGE("Execute - myOut2InId.size() = "<<myOut2InId.size());
MESSAGE("Execute - myIn2OutId.size() = "<<myIn2OutId.size());
}
- }*/
+*/
return 1;
}