static int MYVTKDEBUG = 0;
+// VTK Debug for structures
+static int MYVTKDEBUG_TMESHIMPL = 0;
+static int MYVTKDEBUG_TMESHONENTITYIMPL = 0;
+static int MYVTKDEBUG_TFAMILYIMPL = 0;
+static int MYVTKDEBUG_TGROUPIMPL = 0;
+static int MYVTKDEBUG_TFIELDIMPL = 0;
+static int MYVTKDEBUG_TVALFORTIMEIMPL = 0;
+
#ifdef _DEBUG_
static int MYDEBUG = 0;
static int MYDEBUGWITHFILES = 0;
aCoordHelperPtr->GetCoord(i,eY),
aCoordHelperPtr->GetCoord(i,eZ));
theMesh->myPoints = aPoints;
+ aPoints->Delete();
}
theStorage->SetPoints(aPoints);
}
aFloatArray->SetNumberOfComponents(3);
aDataSetAttributes->SetVectors(aFloatArray);
}
-
+
+ aFloatArray->Delete();
+
GetValsOnTimeStamp(aFloatArray,aNumberOfTuples,aFieldName,theField,theValForTime);
+ //aFloatArray->DebugOn();
}
void GetTimeStamp(VISU::TVTKAttribyteFilter& theAttribyteFilter,
}
}
+VISU::TMeshImpl::~TMeshImpl(){
+ if(MYVTKDEBUG_TMESHIMPL){
+ MSG(MYVTKDEBUG_TMESHIMPL,"VISU::TMeshImpl::~TMeshImpl() this="<<this);
+
+ if (myPoints.GetPointer()) myPoints->DebugOn();
+ else MSG(MYVTKDEBUG_TMESHIMPL,"myPoints is NULL pointer");
+
+ MSG(MYVTKDEBUG_TMESHIMPL,"VISU::TMeshImpl::~TMeshImpl() OK");
+ }
+}
+
+VISU::TMeshOnEntityImpl::~TMeshOnEntityImpl(){
+ if(MYVTKDEBUG_TMESHONENTITYIMPL){
+ MSG(MYVTKDEBUG_TMESHONENTITYIMPL,"VISU::TMeshOnEntityImpl::~TMeshOnEntityImpl() this="<<this);
+
+ if (myStorage.GetPointer()) myStorage->DebugOn();
+ else MSG(MYVTKDEBUG_TMESHONENTITYIMPL,"myStorage is NULL pointer");
+
+ MSG(MYVTKDEBUG_TMESHONENTITYIMPL,"VISU::TMeshOnEntityImpl::~TMeshOnEntityImpl() OK");
+ }
+}
+
+VISU::TFamilyImpl::~TFamilyImpl(){
+ if(MYVTKDEBUG_TFAMILYIMPL){
+ MSG(MYVTKDEBUG_TFAMILYIMPL,"VISU::TFamilyImpl::~TFamilyImpl() this="<<this);
+
+ if (myStorage.GetPointer()) myStorage->DebugOn();
+ else MSG(MYVTKDEBUG_TFAMILYIMPL,"myStorage is NULL pointer");
+
+ MSG(MYVTKDEBUG_TFAMILYIMPL,"VISU::TFamilyImpl::~TFamilyImpl() OK");
+ }
+}
+
+VISU::TGroupImpl::~TGroupImpl(){
+ if(MYVTKDEBUG_TGROUPIMPL){
+ MSG(MYVTKDEBUG_TGROUPIMPL,"VISU::TGroupImpl::~TGroupImpl() this="<<this);
+
+ if (myStorage.GetPointer()) myStorage->DebugOn();
+ else MSG(MYVTKDEBUG_TGROUPIMPL,"myStorage is NULL pointer");
+
+ MSG(MYVTKDEBUG_TGROUPIMPL,"VISU::TGroupImpl::~TGroupImpl() OK");
+ }
+}
+
+VISU::TFieldImpl::~TFieldImpl(){
+ if(MYVTKDEBUG_TFIELDIMPL){
+ MSG(MYVTKDEBUG_TFIELDIMPL,"VISU::TFieldImpl::~TFieldImpl() this="<<this);
+
+ if (myExtractFilter.GetPointer()) myExtractFilter->DebugOn();
+ else MSG(MYVTKDEBUG_TFIELDIMPL,"myExtractFilter is NULL pointer");
+
+ MSG(MYVTKDEBUG_TFIELDIMPL,"VISU::TFieldImpl::~TFieldImpl() OK");
+ }
+}
+
+VISU::TValForTimeImpl::~TValForTimeImpl(){
+ if(MYVTKDEBUG_TVALFORTIMEIMPL){
+ MSG(MYVTKDEBUG_TVALFORTIMEIMPL,"VISU::TValForTimeImpl::~TValForTimeImpl() this="<<this);
+
+ if (myAttribyteFilter.GetPointer()) myAttribyteFilter->DebugOn();
+ else MSG(MYVTKDEBUG_TVALFORTIMEIMPL,"myAttribyteFilter is NULL pointer");
+
+ if (myMergeFilter.GetPointer()) myMergeFilter->DebugOn();
+ else MSG(MYVTKDEBUG_TVALFORTIMEIMPL,"myMergeFilter is NULL pointer");
+
+ if (myStorage.GetPointer()) myStorage->DebugOn();
+ else MSG(MYVTKDEBUG_TVALFORTIMEIMPL,"myStorage is NULL pointer");
+
+ MSG(MYVTKDEBUG_TVALFORTIMEIMPL,"VISU::TValForTimeImpl::~TValForTimeImpl() OK");
+ }
+}
+
VISU_Convertor_impl::VISU_Convertor_impl() {
myIsDone = false;
}
MSG(MYVTKDEBUG,"GetMeshOnEntity - GetCellLinks() = "<<float(aDataSet->GetCellLinks()->GetActualMemorySize()*1000));
MSG(MYVTKDEBUG,"GetMeshOnEntity - GetActualMemorySize() = "<<float(aDataSet->GetActualMemorySize()*1000));
}
+ }catch(std::exception& exc){
+ MSG(1,"Follow exception was occured :\n"<<exc.what());
+ aSource = vtkSmartPointerBase();
+ throw;
}catch(...){
+ MSG(1,"Unknown exception was occured!");
aSource = vtkSmartPointerBase();
throw;
}
typedef std::vector<std::string> TPointsDim;
TPointsDim myPointsDim;
+ ~TMeshImpl();
};
typedef shared_ptr<TMeshImpl> PMeshImpl;
typedef std::vector<TConnect> TConnForCellType;
typedef std::map<vtkIdType,TConnForCellType> TCellsConn;
TCellsConn myCellsConn;
+ ~TMeshOnEntityImpl();
};
typedef shared_ptr<TMeshOnEntityImpl> PMeshOnEntityImpl;
typedef std::set<vtkIdType> TSubMeshOnCellType;
typedef std::map<vtkIdType,TSubMeshOnCellType> TSubMesh;
TSubMesh mySubMesh;
+ ~TFamilyImpl();
};
typedef shared_ptr<TFamilyImpl> PFamilyImpl;
struct TGroupImpl: TGroup{
TVTKSource myStorage;
+ ~TGroupImpl();
};
typedef shared_ptr<TGroupImpl> PGroupImpl;
struct TFieldImpl: TField{
TVTKExtractFilter myExtractFilter;
- ~TFieldImpl()
- {
- if(myExtractFilter.GetPointer())
- myExtractFilter->UnRegisterAllOutputs();
- }
+ ~TFieldImpl();
+
};
typedef shared_ptr<TFieldImpl> PFieldImpl;
typedef std::map<vtkIdType,TValForCellsWithType> TValForCells;
TValForCells myValForCells;
- ~TValForTimeImpl()
- {
- if(myMergeFilter.GetPointer())
- myMergeFilter->UnRegisterAllOutputs();
- if(myAttribyteFilter.GetPointer())
- myAttribyteFilter->UnRegisterAllOutputs();
- }
+ ~TValForTimeImpl();
};
typedef shared_ptr<TValForTimeImpl> PValForTimeImpl;
}
VISU_Actor::~VISU_Actor(){
+ if (MYVTKDEBUG){
+ MESSAGE("VISU_Actor::~VISU_Actor()");
+ myParent->DebugOn();
+ myPipeLine->DebugOn();
+ myMapper->DebugOn();
+ myShrinkFilter->DebugOn();
+ }
SALOME_Actor::SetProperty(NULL);
- myMapper->RemoveAllInputs();
myMapper->Delete();
if(myPipeLine)
myPipeLine->UnRegister(this);
-
- myShrinkFilter->UnRegisterAllOutputs();
+
myShrinkFilter->Delete();
}
#include <vtkMatrix4x4.h>
#include <vtkMapperCollection.h>
+static int MYVTKDEBUG = 0;
+
vtkStandardNewMacro(VISU_MeshAct);
VISU_MeshAct::VISU_MeshAct(){
}
VISU_MeshAct::~VISU_MeshAct(){
+ if (MYVTKDEBUG){
+ MESSAGE("VISU_MeshAct::~VISU_MeshAct()");
+ mySurfaceActor->DebugOn();
+ myEdgeActor->DebugOn();
+ myNodeActor->DebugOn();
+ }
mySurfaceActor->Delete();
myEdgeActor->Delete();
myNodeActor->Delete();
};
#endif
+
+#ifndef MESSAGE
+#define MESSAGE(msg) std::cout<<__FILE__<<"["<<__LINE__<<"]::"<<msg<<endl
+#endif
#include <vtkObjectFactory.h>
#include <vtkRenderer.h>
+static int MYVTKDEBUG = 0;
+
vtkStandardNewMacro(VISU_ScalarMapAct);
VISU_ScalarMapAct::VISU_ScalarMapAct(){
}
VISU_ScalarMapAct::~VISU_ScalarMapAct(){
+ if(MYVTKDEBUG){
+ cout <<__FILE__<<"["<<__LINE__<<"]::"<<"VISU_ScalarMapAct::~VISU_ScalarMapAct()"<<endl;
+ myScalarBar->DebugOn();
+ }
myScalarBar->Delete();
}
using namespace std;
static float EPS = 1.0E-3;
+static int MYVTKDEBUG = 0;
vtkStandardNewMacro(VISU_CutPlanesPL);
}
VISU_CutPlanesPL::~VISU_CutPlanesPL(){
+ if (MYVTKDEBUG){
+ MESSAGE("VISU_CutPlanesPL::~VISU_CutPlanesPL()");
+ myAppendPolyData->DebugOn();
+ }
myAppendPolyData->Delete();
}
aPlane->SetNormal(theDir);
aCutPlane->SetCutFunction(aPlane);
aPlane->Delete();
+ if(MYVTKDEBUG) aPlane->DebugOn();
theAppendPolyData->AddInput(aCutPlane->GetOutput());
- aCutPlane->Register(theAppendPolyData);
aCutPlane->Delete();
+ if(MYVTKDEBUG) aCutPlane->DebugOn();
}
#include <vtkWarpVector.h>
+static int MYVTKDEBUG = 0;
+
#ifdef _DEBUG_
-static int MYDEBUG = 1;
+static int MYDEBUG = 0;
#else
static int MYDEBUG = 0;
#endif
}
VISU_DeformedShapePL::~VISU_DeformedShapePL(){
- myWarpVector->UnRegisterAllOutputs();
+ if(MYVTKDEBUG){
+ MESSAGE("VISU_DeformedShapePL::~VISU_DeformedShapePL()");
+ myWarpVector->DebugOn();
+ myCellDataToPointData->DebugOn();
+ }
myWarpVector->Delete();
-
- myCellDataToPointData->UnRegisterAllOutputs();
myCellDataToPointData->Delete();
}
VISU_PipeLine::~VISU_PipeLine(){
if(MYDEBUG) MESSAGE("~VISU_PipeLine - myInput = "<<myInput->GetReferenceCount());
SetInput(NULL);
- myMapper->RemoveAllInputs();
+ if(MYVTKDEBUG){
+ MESSAGE("VISU_PipeLine::~VISU_PipeLine()");
+ myMapper->DebugOn();
+ }
myMapper->Delete();
}
void VISU_PipeLine::SetInput(TInput* theInput){
if(myInput != theInput){
- if (myInput != NULL) myInput->UnRegister(this);
+ if (myInput != NULL) {
+ if(MYVTKDEBUG) myInput->DebugOn();
+ myInput->UnRegister(this);
+ }
myInput = theInput;
if(myInput != NULL){
myInput->Register(this);
#include "VISU_ScalarMapPL.hxx"
#include "VISU_PipeLineUtils.hxx"
+static int MYVTKDEBUG = 0;
+
#ifdef _DEBUG_
static int MYDEBUG = 1;
#else
VISU_ScalarMapPL::VISU_ScalarMapPL(){
myFieldTransform = VISU_FieldTransform::New();
- //myFieldTransform->DebugOn();
-
myMapperTable = VISU_LookupTable::New();
myMapperTable->SetScale(VTK_SCALE_LINEAR);
myMapperTable->SetHueRange(0.667,0.0);
myBarTable->SetHueRange(0.667,0.0);
myExtractor = VISU_Extractor::New();
- //myExtractor->DebugOn();
}
VISU_ScalarMapPL::~VISU_ScalarMapPL(){
- myFieldTransform->UnRegisterAllOutputs();
+ if(MYVTKDEBUG){
+ MESSAGE("VISU_ScalarMapPL::~VISU_ScalarMapPL()");
+ myFieldTransform->DebugOn();
+ myMapperTable->DebugOn();
+ myBarTable->DebugOn();
+ myExtractor->DebugOn();
+ }
myFieldTransform->Delete();
- myMapperTable->Delete();;
+ myMapperTable->Delete();
myBarTable->Delete();
- myExtractor->UnRegisterAllOutputs();
myExtractor->Delete();
}
SetScalarMode(aPipeLine->GetScalarMode());
SetNbColors(aPipeLine->GetNbColors());
SetScaling(aPipeLine->GetScaling());
+
//Update();
}
}
}
anOutput->SetPoints(aNewPoints);
aNewPoints->Delete();
+ anIdList->Delete();
aPoints->Delete();
}
myInput = NULL;
myIsDone = 0;
CORBA::String_var aName = theStudy->Name();
- MESSAGE("Result_i::Result_i - this = "<<this<<"; StudyId = "<<
+ if(MYDEBUG) MESSAGE("Result_i::Result_i - this = "<<this<<"; StudyId = "<<
theStudy->StudyId()<<"; Name = '"<<aName.in()<<"'");
}
try{
float aSize = myInput->GetSize();
bool aResult = VISU_PipeLine::CheckAvailableMemory(aSize);
- MESSAGE("Result_i::IsPossible - CheckAvailableMemory = "<<float(aSize)<<"; aResult = "<<float(aResult));
+ if(MYDEBUG) MESSAGE("Result_i::IsPossible - CheckAvailableMemory = "<<float(aSize)<<"; aResult = "<<float(aResult));
return aResult;
}catch(std::exception& exc){
INFOS("Follow exception was occured :\n"<<exc.what());
static QString aCommand;
aCommand.sprintf("cp %s %s",myFileInfo.absFilePath().latin1(),aTmpDir.get());
if(system(aCommand) == -1){
- MESSAGE("Create - Can't execute the command :"<<aCommand);
+ if(MYDEBUG) MESSAGE("Create - Can't execute the command :"<<aCommand);
return NULL;
}
if(MYDEBUG) MESSAGE("Result_i::Create - aCommand = "<<aCommand);
}
VISU::Result_i::~Result_i() {
- MESSAGE("Result_i::~Result_i() - this = "<<this);
+ if(MYDEBUG) MESSAGE("Result_i::~Result_i() - this = "<<this);
if(GetSourceId() == eRestoredFile){
static QString aCommand;
aCommand.sprintf("rm %s",myFileInfo.filePath().latin1());
- MESSAGE("Result_i::~Result_i - system("<<aCommand<<") = "<<system(aCommand));
+ if(MYDEBUG) MESSAGE("Result_i::~Result_i - system("<<aCommand<<") = "<<system(aCommand));
aCommand.sprintf("rmdir --ignore-fail-on-non-empty %s",myFileInfo.dirPath().latin1());
- MESSAGE("Result_i::~Result_i - system("<<aCommand<<") = "<<system(aCommand));
+ if(MYDEBUG) MESSAGE("Result_i::~Result_i - system("<<aCommand<<") = "<<system(aCommand));
}
if(myInput) delete myInput;
}
bool aResult = true;
if(isMemoryCheck){
aResult = VISU_PipeLine::CheckAvailableMemory(aSize);
- MESSAGE("ScalarMap_i::IsPossible - CheckAvailableMemory = "<<float(aSize)<<"; aResult = "<<aResult);
+ if (MYDEBUG) MESSAGE("ScalarMap_i::IsPossible - CheckAvailableMemory = "<<float(aSize)<<"; aResult = "<<aResult);
}
return aResult;
}catch(std::exception& exc){