From: apo Date: Fri, 5 May 2006 08:47:46 +0000 (+0000) Subject: Fix for X-Git-Tag: mergeto_trunk_06May06~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e325df34c3fc396616603c60bee70b335e52909f;p=modules%2Fvisu.git Fix for Bug12353 TC: Recorder in Gauss viewer doesn't record picking after "Pause". Bug12341 TC: Temp JPEG files are not deleted after Gauss AVI creation --- diff --git a/src/VVTK/VVTK_ImageWriter.cxx b/src/VVTK/VVTK_ImageWriter.cxx index 9d047598..079557b1 100755 --- a/src/VVTK/VVTK_ImageWriter.cxx +++ b/src/VVTK/VVTK_ImageWriter.cxx @@ -1,112 +1,112 @@ -// SALOME VTKViewer : build VTK viewer into Salome desktop -// -// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : -// Author : -// Module : -// $Header$ - -#include "VVTK_ImageWriter.h" - -#include - -#include -#include -#include -#include - -#ifdef _DEBUG_ -static int MYDEBUG = 0; -#else -static int MYDEBUG = 0; -#endif - - -//---------------------------------------------------------------------------- -VVTK_ImageWriter -::VVTK_ImageWriter(QSemaphore* theSemaphore, - vtkImageData* theImageData, - const std::string& theName, - int theProgressive, - int theQuality): - mySemaphore(theSemaphore), - myImageData(theImageData), - myName(theName), - myProgressive(theProgressive), - myQuality(theQuality), - myConstraint16Flag(true) -{} - -//---------------------------------------------------------------------------- -VVTK_ImageWriter -::~VVTK_ImageWriter() -{ - if(MYDEBUG) cout<<"VVTK_ImageWriter::~VVTK_ImageWriter - this = "< anImageClip; - // - if(myConstraint16Flag){ - int uExtent[6]; - myImageData->GetUpdateExtent(uExtent); - unsigned int width = uExtent[1] - uExtent[0] + 1; - unsigned int height = uExtent[3] - uExtent[2] + 1; - width = (width / 16) * 16; - height= (height / 16) * 16; - uExtent[1] = uExtent[0] + width - 1; - uExtent[3] = uExtent[2] + height - 1; - // - anImageClip = vtkImageClip::New(); - anImageClip->Delete(); - - anImageClip->SetInput(myImageData); - anImageClip->SetOutputWholeExtent(uExtent); - anImageClip->ClipDataOn(); - anImageData = anImageClip->GetOutput(); - } - // - aWriter->WriteToMemoryOff(); - aWriter->SetFileName(myName.c_str()); - aWriter->SetQuality(myQuality); - aWriter->SetProgressive(myProgressive); - aWriter->SetInput(anImageData); - aWriter->Write(); - - aWriter->Delete(); - myImageData->Delete(); - - if(MYDEBUG) cout<<"VVTK_ImageWriter::run "<< - "- this = "< + +#include +#include +#include +#include + +#ifdef _DEBUG_ +static int MYDEBUG = 0; +#else +static int MYDEBUG = 0; +#endif + + +//---------------------------------------------------------------------------- +VVTK_ImageWriter +::VVTK_ImageWriter(QSemaphore* theSemaphore, + vtkImageData* theImageData, + const std::string& theName, + int theProgressive, + int theQuality): + mySemaphore(theSemaphore), + myImageData(theImageData), + myName(theName), + myProgressive(theProgressive), + myQuality(theQuality), + myConstraint16Flag(true) +{} + +//---------------------------------------------------------------------------- +VVTK_ImageWriter +::~VVTK_ImageWriter() +{ + if(MYDEBUG) cout<<"VVTK_ImageWriter::~VVTK_ImageWriter - this = "< anImageClip; + // + if(myConstraint16Flag){ + int uExtent[6]; + myImageData->GetUpdateExtent(uExtent); + unsigned int width = uExtent[1] - uExtent[0] + 1; + unsigned int height = uExtent[3] - uExtent[2] + 1; + width = (width / 16) * 16; + height= (height / 16) * 16; + uExtent[1] = uExtent[0] + width - 1; + uExtent[3] = uExtent[2] + height - 1; + // + anImageClip = vtkImageClip::New(); + anImageClip->Delete(); + + anImageClip->SetInput(myImageData); + anImageClip->SetOutputWholeExtent(uExtent); + anImageClip->ClipDataOn(); + anImageData = anImageClip->GetOutput(); + } + // + aWriter->WriteToMemoryOff(); + aWriter->SetFileName(myName.c_str()); + aWriter->SetQuality(myQuality); + aWriter->SetProgressive(myProgressive); + aWriter->SetInput(anImageData); + aWriter->Write(); + + aWriter->Delete(); + myImageData->Delete(); + + if(MYDEBUG) cout<<"VVTK_ImageWriter::run "<< + "- this = "< - -#include - -#include - - -#ifdef _DEBUG_ -static int MYDEBUG = 0; -#else -static int MYDEBUG = 0; -#endif - -//---------------------------------------------------------------------------- -VVTK_ImageWriterMgr -::VVTK_ImageWriterMgr() -{ - int aMax = std::numeric_limits::max() / 2; - mySemaphore = new QSemaphore(aMax); - *mySemaphore += aMax; - if(MYDEBUG) cout<<"VVTK_ImageWriterMgr::VVTK_ImageWriterMgr "<< - "- total = "<total()<< - "; available = "<available()<start(); - -} - - -//---------------------------------------------------------------------------- -void -VVTK_ImageWriterMgr -::Stop() -{ - if(MYDEBUG) cout<<"VVTK_ImageWriterMgr::Stop "<< - "- total = "<total()<< - "; available = "<available()< + +#include + +#include + + +#ifdef _DEBUG_ +static int MYDEBUG = 0; +#else +static int MYDEBUG = 0; +#endif + +//---------------------------------------------------------------------------- +VVTK_ImageWriterMgr +::VVTK_ImageWriterMgr() +{ + int aMax = std::numeric_limits::max() / 2; + mySemaphore = new QSemaphore(aMax); + *mySemaphore += aMax; + if(MYDEBUG) cout<<"VVTK_ImageWriterMgr::VVTK_ImageWriterMgr "<< + "- total = "<total()<< + "; available = "<available()<start(); + +} + + +//---------------------------------------------------------------------------- +void +VVTK_ImageWriterMgr +::Stop() +{ + if(MYDEBUG) cout<<"VVTK_ImageWriterMgr::Stop "<< + "- total = "<total()<< + "; available = "<available()< -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include "utilities.h" - -#ifdef _DEBUG_ -static int MYDEBUG = 0; -#else -static int MYDEBUG = 0; -#endif - - -namespace -{ - //---------------------------------------------------------------------------- - inline - void - GetNameJPEG(const std::string& thePreffix, - const int theIndex, - std::string& theName) - { - using namespace std; - ostringstream aStream; - aStream<SetClientData(this); - myCommand->SetCallback(VVTK_Recorder::ProcessEvents); -} - - -//---------------------------------------------------------------------------- -VVTK_Recorder -::~VVTK_Recorder() -{ - myCommand->Delete(); - myFilter->Delete(); - delete myWriterMgr; -} - - -//---------------------------------------------------------------------------- -void -VVTK_Recorder -::CheckExistAVIMaker() -{ - myErrorStatus = 0; - using namespace std; - ostringstream aStream; - aStream<<"which "<& /dev/null"; - std::string anAVIMakeCheck = aStream.str(); - int iErr = system(anAVIMakeCheck.c_str()); - if(iErr != 0) - myErrorStatus = 127; -} - - -//---------------------------------------------------------------------------- -void -VVTK_Recorder -::SetName(const char* theName) -{ - myName = theName; -} - -const char* -VVTK_Recorder::Name() const -{ - return myName.c_str(); -} - - -//---------------------------------------------------------------------------- -void -VVTK_Recorder -::SetNbFPS(const double theNbFPS) -{ - myNbFPS = theNbFPS; -} - -double -VVTK_Recorder -::NbFPS() const -{ - return myNbFPS; -} - - -//---------------------------------------------------------------------------- -void -VVTK_Recorder -::SetQuality(int theQuality) -{ - myQuality = theQuality; -} - -int -VVTK_Recorder -::GetQuality() const -{ - return myQuality; -} - - -//---------------------------------------------------------------------------- -void -VVTK_Recorder -::SetRenderWindow(vtkRenderWindow* theRenderWindow) -{ - myRenderWindow = theRenderWindow; -} - -vtkRenderWindow* -VVTK_Recorder -::RenderWindow() -{ - return myRenderWindow; -} - - -//---------------------------------------------------------------------------- -void -VVTK_Recorder -::SetProgressiveMode(bool theProgressiveMode) -{ - myProgressiveMode = theProgressiveMode; -} - -bool -VVTK_Recorder -::GetProgressiveMode() const -{ - return myProgressiveMode; -} - - -//---------------------------------------------------------------------------- -void -VVTK_Recorder -::SetUseSkippedFrames(bool theUseSkippedFrames) -{ - myUseSkippedFrames = theUseSkippedFrames; -} - -bool -VVTK_Recorder -::UseSkippedFrames() const -{ - return myUseSkippedFrames; -} - - -//---------------------------------------------------------------------------- -int -VVTK_Recorder -::ErrorStatus() const -{ - return myErrorStatus; -} - -int -VVTK_Recorder -::State() const -{ - return myState; -} - - -//---------------------------------------------------------------------------- -void -VVTK_Recorder -::ProcessEvents(vtkObject* vtkNotUsed(theObject), - unsigned long theEvent, - void* theClientData, - void* vtkNotUsed(theCallData)) -{ - if(vtkObject* anObj = reinterpret_cast(theClientData)){ - if(VVTK_Recorder* aSelf = dynamic_cast(anObj)){ - if(theEvent==vtkCommand::EndEvent){ - if(aSelf->State() == VVTK_Recorder::VVTK_Recorder_Record){ - aSelf->DoRecord(); - } - } - } - } -} - - -//---------------------------------------------------------------------------- -void -VVTK_Recorder -::Record() -{ - if(myState == VVTK_Recorder_Stop){ - if(myRenderWindow){ - myState = VVTK_Recorder_Record; - myFilter->SetInput(myRenderWindow); - myFrameIndex = -1; - myNbWrittenFrames = 0; - myRenderWindow->RemoveObserver(myCommand); - myRenderWindow->AddObserver(vtkCommand::EndEvent, - myCommand, - myPriority); - myRenderWindow->Render(); - } - } -} - - -//---------------------------------------------------------------------------- -void -VVTK_Recorder -::Stop() -{ - QApplication::setOverrideCursor( Qt::waitCursor ); - - if(myState == VVTK_Recorder_Record){ - if(!myPaused) - DoRecord(); - - myWriterMgr->Stop(); - - if(myUseSkippedFrames) - AddSkippedFrames(); - - myFrameIndexes.clear(); - - MakeFileAVI(); - } - myState = VVTK_Recorder_Stop; - myPaused = 0; - - QApplication::restoreOverrideCursor(); -} - - -//---------------------------------------------------------------------------- -void -VVTK_Recorder -::Pause() -{ - myPaused = myPaused ? 0 : 1; - if(myPaused && !myFrameIndexes.empty()){ - size_t aLastId = myFrameIndexes.size() - 1; - myFrameIndexes[aLastId] *= -1; - } -} - - -//---------------------------------------------------------------------------- -void -VVTK_Recorder -::DoRecord() -{ - if(myPaused) - return; - - if(myFrameIndex < 0){ - myFrameIndex = 0; - myTimeStart = vtkTimerLog::GetCurrentTime(); - }else{ - double aTimeNow = vtkTimerLog::GetCurrentTime(); - double aDelta = aTimeNow - myTimeStart; - if(aDelta < 0.0) - return; - - int aFrameIndex = int(aDelta*myNbFPS); - if(aFrameIndex == myFrameIndex) - return; - - myFrameIndex = aFrameIndex; - } - - myFrameIndexes.push_back(myFrameIndex); - if(MYDEBUG) cout<<"VVTK_Recorder::DoRecord - myFrameIndex = "<RemoveObserver(myCommand); - myFilter->Modified(); - - std::string aName; - GetNameJPEG(myName,myFrameIndex,aName); - - PreWrite(); - - vtkImageData *anImageData = vtkImageData::New(); - anImageData->DeepCopy(myFilter->GetOutput()); - - myWriterMgr->StartImageWriter(anImageData,aName,myProgressiveMode,myQuality); - myNbWrittenFrames++; - - myRenderWindow->AddObserver(vtkCommand::EndEvent, - myCommand, - myPriority); -} - - -//---------------------------------------------------------------------------- -void -VVTK_Recorder -::PreWrite() -{ - vtkImageData *anImageData = myFilter->GetOutput(); - // - if(!anImageData){ - myErrorStatus = 20; - return; - } - anImageData->UpdateInformation(); - int *anExtent = anImageData->GetWholeExtent(); - anImageData->SetUpdateExtent(anExtent[0], anExtent[1], - anExtent[2], anExtent[3], - 0,0); - anImageData->UpdateData(); -} - - -//---------------------------------------------------------------------------- -void -VVTK_Recorder -::AddSkippedFrames() -{ - myErrorStatus = 0; - - if(myFrameIndexes.size() < 2) - return; - - size_t anId = 0, anEnd = myFrameIndexes.size() - 1; - for(; anId < anEnd; anId++){ - int aStartIndex = myFrameIndexes[anId]; - if(aStartIndex < 0) - continue; - - int aFinishIndex = abs(myFrameIndexes[anId + 1]); - if(aStartIndex + 1 == aFinishIndex) - continue; - - std::string anInitialName; - std::ostringstream aStream; - GetNameJPEG(myName,aStartIndex,anInitialName); - for(int anIndex = aStartIndex + 1; anIndex < aFinishIndex; anIndex++){ - myNbWrittenFrames++; - std::string anCurrentName; - GetNameJPEG(myName,anIndex,anCurrentName); - aStream<<"ln -s "<< anInitialName<<" "< +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include "utilities.h" + +#ifdef _DEBUG_ +static int MYDEBUG = 0; +#else +static int MYDEBUG = 0; +#endif + + +namespace +{ + //---------------------------------------------------------------------------- + inline + void + GetNameJPEG(const std::string& thePreffix, + const int theIndex, + std::string& theName) + { + using namespace std; + ostringstream aStream; + aStream<SetClientData(this); + myCommand->SetCallback(VVTK_Recorder::ProcessEvents); +} + + +//---------------------------------------------------------------------------- +VVTK_Recorder +::~VVTK_Recorder() +{ + myCommand->Delete(); + myFilter->Delete(); + delete myWriterMgr; +} + + +//---------------------------------------------------------------------------- +void +VVTK_Recorder +::CheckExistAVIMaker() +{ + myErrorStatus = 0; + using namespace std; + ostringstream aStream; + aStream<<"which "<& /dev/null"; + std::string anAVIMakeCheck = aStream.str(); + int iErr = system(anAVIMakeCheck.c_str()); + if(iErr != 0) + myErrorStatus = 127; +} + + +//---------------------------------------------------------------------------- +void +VVTK_Recorder +::SetName(const char* theName) +{ + myName = theName; +} + +const char* +VVTK_Recorder::Name() const +{ + return myName.c_str(); +} + + +//---------------------------------------------------------------------------- +void +VVTK_Recorder +::SetNbFPS(const double theNbFPS) +{ + myNbFPS = theNbFPS; +} + +double +VVTK_Recorder +::NbFPS() const +{ + return myNbFPS; +} + + +//---------------------------------------------------------------------------- +void +VVTK_Recorder +::SetQuality(int theQuality) +{ + myQuality = theQuality; +} + +int +VVTK_Recorder +::GetQuality() const +{ + return myQuality; +} + + +//---------------------------------------------------------------------------- +void +VVTK_Recorder +::SetRenderWindow(vtkRenderWindow* theRenderWindow) +{ + myRenderWindow = theRenderWindow; +} + +vtkRenderWindow* +VVTK_Recorder +::RenderWindow() +{ + return myRenderWindow; +} + + +//---------------------------------------------------------------------------- +void +VVTK_Recorder +::SetProgressiveMode(bool theProgressiveMode) +{ + myProgressiveMode = theProgressiveMode; +} + +bool +VVTK_Recorder +::GetProgressiveMode() const +{ + return myProgressiveMode; +} + + +//---------------------------------------------------------------------------- +void +VVTK_Recorder +::SetUseSkippedFrames(bool theUseSkippedFrames) +{ + myUseSkippedFrames = theUseSkippedFrames; +} + +bool +VVTK_Recorder +::UseSkippedFrames() const +{ + return myUseSkippedFrames; +} + + +//---------------------------------------------------------------------------- +int +VVTK_Recorder +::ErrorStatus() const +{ + return myErrorStatus; +} + +int +VVTK_Recorder +::State() const +{ + return myState; +} + + +//---------------------------------------------------------------------------- +void +VVTK_Recorder +::ProcessEvents(vtkObject* vtkNotUsed(theObject), + unsigned long theEvent, + void* theClientData, + void* vtkNotUsed(theCallData)) +{ + if(vtkObject* anObj = reinterpret_cast(theClientData)){ + if(VVTK_Recorder* aSelf = dynamic_cast(anObj)){ + if(theEvent==vtkCommand::EndEvent){ + if(aSelf->State() == VVTK_Recorder::VVTK_Recorder_Record){ + aSelf->DoRecord(); + } + } + } + } +} + + +//---------------------------------------------------------------------------- +void +VVTK_Recorder +::Record() +{ + if(myState == VVTK_Recorder_Stop){ + if(myRenderWindow){ + myState = VVTK_Recorder_Record; + myFilter->SetInput(myRenderWindow); + myFrameIndex = -1; + myNbWrittenFrames = 0; + myRenderWindow->RemoveObserver(myCommand); + myRenderWindow->AddObserver(vtkCommand::EndEvent, + myCommand, + myPriority); + myRenderWindow->Render(); + } + } +} + + +//---------------------------------------------------------------------------- +void +VVTK_Recorder +::Stop() +{ + QApplication::setOverrideCursor( Qt::waitCursor ); + + if(myState == VVTK_Recorder_Record){ + if(!myPaused) + DoRecord(); + + myWriterMgr->Stop(); + + if(myUseSkippedFrames) + AddSkippedFrames(); + + myFrameIndexes.clear(); + + MakeFileAVI(); + } + myState = VVTK_Recorder_Stop; + myPaused = 0; + + QApplication::restoreOverrideCursor(); +} + + +//---------------------------------------------------------------------------- +void +VVTK_Recorder +::Pause() +{ + myPaused = myPaused ? 0 : 1; + if(myPaused && !myFrameIndexes.empty()){ + myFrameIndexes.back() *= -1; + if(MYDEBUG) cout<<"VVTK_Recorder::Pause - myFrameIndexes.back() = "< -#include -#include - -#include - -class vtkRenderWindow; -class vtkCallbackCommand; -class vtkWindowToImageFilter; -class VVTK_ImageWriterMgr; -// -class VVTK_Recorder : public vtkObject -{ - protected: - enum State { - VVTK_Recorder_Unknown=0, - VVTK_Recorder_Record, - VVTK_Recorder_Stop - }; - - public: - static VVTK_Recorder *New(); - vtkTypeRevisionMacro(VVTK_Recorder,vtkObject); - - void - SetRenderWindow(vtkRenderWindow* theRenderWindow); - - vtkRenderWindow* - RenderWindow(); - - void - SetName(const char *theName); - - const char* - Name() const; - - void - SetNbFPS(const double theNbFPS); - - double - NbFPS() const; - - void - SetQuality(int theQuality); - - int - GetQuality() const; - - void - SetProgressiveMode(bool theProgressiveMode); - - bool - GetProgressiveMode() const; - - void - SetUseSkippedFrames(bool theUseSkippedFrames); - - bool - UseSkippedFrames() const; - - void - Record(); - - void - Pause(); - - void - Stop(); - - int - State() const; - - int - ErrorStatus() const; - - void - CheckExistAVIMaker(); - -protected : - VVTK_Recorder(); - - ~VVTK_Recorder(); - - void - DoRecord(); - - void - MakeFileAVI(); - - void - AddSkippedFrames(); - - void - PreWrite(); - - static - void - ProcessEvents(vtkObject* theObject, - unsigned long theEvent, - void* theClientData, - void* theCallData); - -protected : - int myState; - int myPaused; - int myErrorStatus; - - float myPriority; - double myTimeStart; - - int myFrameIndex; - int myNbWrittenFrames; - - double myNbFPS; - int myQuality; - bool myProgressiveMode; - - typedef std::vector TFrameIndexes; - TFrameIndexes myFrameIndexes; - bool myUseSkippedFrames; - - std::string myName; - std::string myNameAVIMaker; - - vtkCallbackCommand *myCommand; - vtkRenderWindow *myRenderWindow; - vtkWindowToImageFilter *myFilter; - VVTK_ImageWriterMgr *myWriterMgr; - - -private: - VVTK_Recorder(const VVTK_Recorder&); //Not implemented - void operator=(const VVTK_Recorder&); //Not implemented -}; -#endif +// SALOME VTKViewer : build VTK viewer into Salome desktop +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : +// Author : +// Module : SALOME +// $Header$ + +#ifndef _VVTK_Recorder_Header_File_ +#define _VVTK_Recorder_Header_File_ + +#include +#include +#include + +#include + +class vtkRenderWindow; +class vtkCallbackCommand; +class vtkWindowToImageFilter; +class VVTK_ImageWriterMgr; +// +class VVTK_Recorder : public vtkObject +{ + protected: + enum State { + VVTK_Recorder_Unknown=0, + VVTK_Recorder_Record, + VVTK_Recorder_Stop + }; + + public: + static VVTK_Recorder *New(); + vtkTypeRevisionMacro(VVTK_Recorder,vtkObject); + + void + SetRenderWindow(vtkRenderWindow* theRenderWindow); + + vtkRenderWindow* + RenderWindow(); + + void + SetName(const char *theName); + + const char* + Name() const; + + void + SetNbFPS(const double theNbFPS); + + double + NbFPS() const; + + void + SetQuality(int theQuality); + + int + GetQuality() const; + + void + SetProgressiveMode(bool theProgressiveMode); + + bool + GetProgressiveMode() const; + + void + SetUseSkippedFrames(bool theUseSkippedFrames); + + bool + UseSkippedFrames() const; + + void + Record(); + + void + Pause(); + + void + Stop(); + + int + State() const; + + int + ErrorStatus() const; + + void + CheckExistAVIMaker(); + +protected : + VVTK_Recorder(); + + ~VVTK_Recorder(); + + void + DoRecord(); + + void + MakeFileAVI(); + + void + AddSkippedFrames(); + + void + PreWrite(); + + static + void + ProcessEvents(vtkObject* theObject, + unsigned long theEvent, + void* theClientData, + void* theCallData); + +protected : + int myState; + int myPaused; + int myErrorStatus; + + float myPriority; + double myTimeStart; + + int myFrameIndex; + int myNbWrittenFrames; + + double myNbFPS; + int myQuality; + bool myProgressiveMode; + + typedef std::vector TFrameIndexes; + TFrameIndexes myFrameIndexes; + bool myUseSkippedFrames; + + std::string myName; + std::string myNameAVIMaker; + + vtkCallbackCommand *myCommand; + vtkRenderWindow *myRenderWindow; + vtkWindowToImageFilter *myFilter; + VVTK_ImageWriterMgr *myWriterMgr; + + +private: + VVTK_Recorder(const VVTK_Recorder&); //Not implemented + void operator=(const VVTK_Recorder&); //Not implemented +}; +#endif diff --git a/src/VVTK/VVTK_SegmentationCursorDlg.cxx b/src/VVTK/VVTK_SegmentationCursorDlg.cxx index 30eab723..4f4d4e39 100644 --- a/src/VVTK/VVTK_SegmentationCursorDlg.cxx +++ b/src/VVTK/VVTK_SegmentationCursorDlg.cxx @@ -182,9 +182,9 @@ VVTK_SegmentationCursorDlg::VVTK_SegmentationCursorDlg( QWidget* parent, const c QLabel* ZOriginLabel = new QLabel( tr( "ORIGIN_Z" ), myOriginGroup ); myZOriginSpinBox = new QtxDblSpinBox( -1000.0, 1000.0, 0.1, myOriginGroup ); - myZOriginSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); + //myZOriginSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); myZOriginSpinBox->setMinimumWidth( 100 ); - myZOriginSpinBox->setValue( 0.0 ); + myZOriginSpinBox->setValue( 1.0 ); OriginGroupLayout->addWidget( XOriginLabel, 0, 0 ); OriginGroupLayout->addWidget( myXOriginSpinBox, 0, 1 );