VISU_Plot3DPL
::GetMemorySize()
{
- vtkDataSet* aDataSet = myGeometryFilter->GetOutput();
- unsigned long int aSize = aDataSet->GetActualMemorySize() * 1024;
-
- if(myCellDataToPointData->GetInput()){
- aDataSet = myCellDataToPointData->GetOutput();
+ unsigned long int aSize = 0;
+ if(vtkDataSet* aDataSet = myGeometryFilter->GetInput())
aSize += aDataSet->GetActualMemorySize() * 1024;
- }
+
+ if(myCellDataToPointData->GetInput())
+ if(vtkDataSet* aDataSet = myCellDataToPointData->GetOutput())
+ aSize += aDataSet->GetActualMemorySize() * 1024;
- aDataSet = myContourFilter->GetInput();
- aSize += aDataSet->GetActualMemorySize() * 1024;
+ if(vtkDataSet* aDataSet = myContourFilter->GetInput())
+ aSize += aDataSet->GetActualMemorySize() * 1024;
- aDataSet = myWarpScalar->GetInput();
- aSize += aDataSet->GetActualMemorySize() * 1024;
+ if(vtkDataSet* aDataSet = myWarpScalar->GetInput())
+ aSize += aDataSet->GetActualMemorySize() * 1024;
int anEnd = myAppendPolyData->GetNumberOfInputs();
for(int anId = 0; anId < anEnd; anId++){
- aDataSet = myAppendPolyData->GetInput(anId);
- aSize += aDataSet->GetActualMemorySize() * 1024;
+ if(vtkDataSet* aDataSet = myAppendPolyData->GetInput(anId))
+ aSize += aDataSet->GetActualMemorySize() * 1024;
}
aSize += Superclass::GetMemorySize();
}
-int
+size_t
VISU_StreamLinesPL
::SetParams(vtkFloatingPointType theIntStep,
vtkFloatingPointType thePropogationTime,
theIntStep = CorrectIntegrationStep(theIntStep,aPointSet,thePercents);
thePropogationTime = CorrectPropagationTime(thePropogationTime,aPointSet);
theStepLength = CorrectStepLength(theStepLength,aPointSet);
- int isAccepted = FindPossibleParams(aPointSet,theStepLength,thePropogationTime,thePercents);
+ size_t isAccepted = FindPossibleParams(aPointSet,theStepLength,thePropogationTime,thePercents);
if((!isOnlyTry && isAccepted) || (isOnlyTry && isAccepted == 1)){
mySource = theSource;
myPercents = thePercents;
ShallowCopy(VISU_PipeLine *thePipeLine);
virtual
- int
+ size_t
SetParams(vtkFloatingPointType theIntStep,
vtkFloatingPointType thePropogationTime,
vtkFloatingPointType theStepLength,
myAppendFilter->AddInput(aPrs3d->GetPipeLine()->GetMapper()->GetInput());
aSource = myAppendFilter->GetOutput();
}
- int anIsAccepted = myStreamLinesPL->SetParams(theIntStep,
- thePropogationTime,
- theStepLength,
- aSource,
- thePercents,
- theDirection,
- 1);
- if(anIsAccepted == 1)
+ size_t anIsAccepted = myStreamLinesPL->SetParams(theIntStep,
+ thePropogationTime,
+ theStepLength,
+ aSource,
+ thePercents,
+ theDirection,
+ 1);
+ if(anIsAccepted)
SetSource(aPrs3d);
- return anIsAccepted == 1;
+ return anIsAccepted;
}