#include <vtkCell.h>
#include <vtkPointSet.h>
+#include <vtkDataSet.h>
#include <vtkStreamLine.h>
#ifdef _DEBUG_
aPipeLine->GetUsedPoints(),
aPipeLine->GetDirection());
}
- VISU_DeformedShapePL::ShallowCopy(thePipeLine);
+ Superclass::ShallowCopy(thePipeLine);
}
::GetVelocityCoeff(vtkPointSet* theDataSet)
{
vtkFloatingPointType* aScalarRange = theDataSet->GetScalarRange();
- return (fabs(aScalarRange[1]) + fabs(aScalarRange[0]))/2.0;
+ vtkFloatingPointType aVelocity = (fabs(aScalarRange[1]) + fabs(aScalarRange[0]))/2.0;
+ if (aVelocity < EPS)
+ return EPS;
+
+ return aVelocity;
}
VISU_StreamLinesPL
::Init()
{
- VISU_PrsMergerPL::Init();
+ Superclass::Init();
vtkPointSet* aDataSet = myExtractor->GetOutput();
vtkFloatingPointType anIntStep = GetBaseIntegrationStep(aDataSet);
vtkFloatingPointType aPropagationTime = GetBasePropagationTime(aDataSet);
GetInput2()->Update();
VISU::CellDataToPoint(myStream,myCellDataToPointData,GetInput2(),myFieldTransform);
vtkFloatingPointType *aBounds = GetInput2()->GetBounds();
+
+ myStream->Update();
+ // check: Is streamlines exists? If no points in stream lines, return input2
+ if(myStream->GetOutput()->GetNumberOfPoints() == 0)
+ myGeomFilter->SetInput(GetInput2());
+ else
+ myGeomFilter->SetInput(myStream->GetOutput());
+
myGeomFilter->SetExtent(aBounds);
myGeomFilter->ExtentClippingOn();
- myGeomFilter->SetInput(myStream->GetOutput());
return myGeomFilter->GetOutput();
}
VISU_StreamLinesPL
::Update()
{
- VISU_PrsMergerPL::Update();
+ Superclass::Update();
}
void
VISU_StreamLinesPL
::SetMapScale(vtkFloatingPointType theMapScale)
{
- VISU_ScalarMapPL::SetMapScale(theMapScale);
+ Superclass::SetMapScale(theMapScale);
}