[Paraview] vtkHierarchicalDataExtractDataSets not
passing PointData from unstructured Grids?
Jean M. Favre
jfavre at cscs.ch
Mon Aug 22 07:52:29 EDT 2005
I have a reader building a hierarchical dataset made of Unstructured Grids.
3 actors are built to process a subsets of datasets (cutter, threshold
and contour).
The first two (cutter and threshold) execute and display fine, while the
3rd one (contour) causes a segmentation fault.
Since they are all three consuming the same data, I cannot understand if
vtkContour expects things a little bit differently.
I am further puzzled by the fact that ParaView (2.3) runs without any
crash, cutting, thresholding and iso-contouring the data. So what does
ParaView do under the hood to make Contour run without crashing, and
what is the magic line of code I need to add to the almost-equivalent
C++ test program below?
I have included a stack trace for the curious folks.
////// C++ code
vtkCFX5Reader* reader = vtkCFX5Reader::New();
reader->SetFileName(fullname);
reader->UpdateInformation();
vtkHierarchicalDataExtractDataSets *eds =
vtkHierarchicalDataExtractDataSets::New();
eds->SetInputConnection(0,reader->GetOutputPort(0));
for(i = 10; i <= 16; i++)
{
eds->AddDataSet(0,i);
}
vtkContourFilter *contour = vtkContourFilter::New();
contour->SetInputConnection(0, eds->GetOutputPort(0));
contour->SetValue(0, .5);
vtkHierarchicalDataSetGeometryFilter *geom9 =
vtkHierarchicalDataSetGeometryFilter::New();
geom9->SetInputConnection(0, contour->GetOutputPort(0));
vtkPolyDataMapper* contourmap = vtkPolyDataMapper::New();
contourmap->SetInputConnection(0, geom9->GetOutputPort(0));
vtkActor* contouract = vtkActor::New();
contouract->SetMapper(contourmap);
/////////// cutting plane
vtkPlane *plane = vtkPlane::New();
plane->SetOrigin(0,0,0.024);
plane->SetNormal(0,0,1);
vtkCutter *cuts = vtkCutter::New();
cuts->SetInputConnection(0, eds->GetOutputPort(0));
cuts->SetCutFunction(plane);
vtkHierarchicalDataSetGeometryFilter *geom8 =
vtkHierarchicalDataSetGeometryFilter::New();
geom8->SetInputConnection(0, cuts->GetOutputPort(0));
vtkPolyDataMapper* cutsmap = vtkPolyDataMapper::New();
cutsmap->SetInputConnection(0, geom8->GetOutputPort(0));
vtkActor* cutsact = vtkActor::New();
cutsact->SetMapper(cutsmap);
///////////// threshold
vtkThreshold *thres = vtkThreshold::New();
thres->SetInputConnection(0, eds->GetOutputPort(0));
thres->ThresholdByUpper(0.5);
vtkHierarchicalDataSetGeometryFilter *geom7 =
vtkHierarchicalDataSetGeometryFilter::New();
geom7->SetInputConnection(0, thres->GetOutputPort(0));
vtkPolyDataMapper* thresmap = vtkPolyDataMapper::New();
thresmap->SetInputConnection(0, geom7->GetOutputPort(0));
vtkActor* thresact = vtkActor::New();
thresact->SetMapper(thresmap);
ren->AddActor(thresact);
ren->AddActor(cutsact);
//ren->AddActor(contouract); if this one is displayed, it causes seg
fault.
/////////////
thanks for any tips.
--
Dr. Jean M. Favre, email:favre @ cscs.ch
http://www.cscs.ch/about/Favre.php
CSCS, Swiss National Supercomputing Centre | Tel: +41 (91) 610.82.40
Via Cantonale, 6928 Manno, Switzerland | Fax: +41 (91) 610.82.82
-------------- next part --------------
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1115613248 (LWP 31161)]
0x41924f66 in vtkInformation::GetAsObjectBase (this=0x0, key=0x8059710)
at /local/apps/ParaView/VTK/Filtering/vtkInformation.cxx:313
313 unsigned short hash =
(gdb) where
#0 0x41924f66 in vtkInformation::GetAsObjectBase (this=0x0, key=0x8059710)
at /local/apps/ParaView/VTK/Filtering/vtkInformation.cxx:313
#1 0x41930eff in vtkInformationKeyToInformationFriendship::GetAsObjectBase (info=0x0,
key=0x8059710) at /local/apps/ParaView/VTK/Filtering/vtkInformationKey.cxx:33
#2 0x41930c2f in vtkInformationKey::GetAsObjectBase (this=0x8059710, info=0x0)
at /local/apps/ParaView/VTK/Filtering/vtkInformationKey.cxx:94
#3 0x4192eadf in vtkInformationIntegerKey::Has (this=0x8059710, info=0x0)
at /local/apps/ParaView/VTK/Filtering/vtkInformationIntegerKey.cxx:84
#4 0x419255d3 in vtkInformation::Has (this=0x0, key=0x8059710)
at /local/apps/ParaView/VTK/Filtering/vtkInformation.cxx:496
#5 0x4188b4a6 in vtkCompositeDataPipeline::ComputePipelineMTime (this=0x80977c8,
forward=1, request=0x0, inInfoVec=0x80587f8)
at /local/apps/ParaView/VTK/Filtering/vtkCompositeDataPipeline.cxx:75
#6 0x418ace84 in vtkDemandDrivenPipeline::ComputePipelineMTime (this=0x822fc58,
forward=1, request=0x0, inInfoVec=0x8114440)
at /local/apps/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx:115
#7 0x418ad432 in vtkDemandDrivenPipeline::UpdatePipelineMTime (this=0x822fc58)
at /local/apps/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx:306
#8 0x418ad495 in vtkDemandDrivenPipeline::UpdateDataObject (this=0x822fc58)
at /local/apps/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx:320
#9 0x418b260e in vtkExecutive::GetOutputData (this=0x822fc58, port=0)
at /local/apps/ParaView/VTK/Filtering/vtkExecutive.cxx:426
#10 0x4186cf09 in vtkAlgorithm::GetOutputDataObject (this=0x822f9f0, port=0)
at /local/apps/ParaView/VTK/Filtering/vtkAlgorithm.cxx:623
#11 0x4196f87a in vtkPolyDataAlgorithm::GetOutput (this=0x822f9f0, port=0)
---Type <return> to continue, or q <return> to quit---
at /local/apps/ParaView/VTK/Filtering/vtkPolyDataAlgorithm.cxx:57
#12 0x4196f84e in vtkPolyDataAlgorithm::GetOutput (this=0x822f9f0)
at /local/apps/ParaView/VTK/Filtering/vtkPolyDataAlgorithm.cxx:51
#13 0x40b5b1b1 in vtkContourFilter::RequestData (this=0x80b6c68, request=0x820cee8,
inputVector=0x8113fe8, outputVector=0x80913d8)
at /local/apps/ParaView/VTK/Graphics/vtkContourFilter.cxx:377
More information about the ParaView
mailing list