[vtkusers] problem isosurfacing
Gala'Vi and Liss @ Mainframe Country
pushkare at students.uiuc.edu
Mon Aug 13 16:23:24 EDT 2001
Hello fellow VTK users,
I'm trying to compute an isosurface for a rather large rectilinear grid
dataset using vtkContourFilter. I have vtk3.1.2 on SGI IRIX 6.5.
Here's the code that I'm using to do this:
CRead = vtkHDFReader::New();
CRead->SetFileName("/nfs/zeus/lcadsk1/pushkare/imax4.qh06300.g03");
CRead->SelectDataset(1);
CRead->ForceUpdate();
fprintf(stderr, "DATASETS:%d\n", CRead->GetNumDatasets());
win = vtkRenderWindow::New();
win->SetSize(400, 400);
ren = vtkRenderer::New();
win->AddRenderer(ren);
vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New();
iren->SetRenderWindow(win);
iren->SetUserMethod(UserMethod, 0);
vtkRectilinearGrid* g =
(vtkRectilinearGrid*)CRead->GetOutput()->MakeObject();
g->CopyStructure(CRead->GetOutput());
g->GetPointData()->DeepCopy(CRead->GetOutput()->GetPointData());
g->GetCellData()->DeepCopy(CRead->GetOutput()->GetCellData());
g->Modified();
vtkOutlineFilter* out = vtkOutlineFilter::New();
out->SetInput(g);
out->Update();
vtkPolyDataMapper* outMap = vtkPolyDataMapper::New();
outMap->SetInput(out->GetOutput());
vtkActor* outActor = vtkActor::New();
outActor->SetMapper(outMap);
vtkContourFilter* cont1 = vtkContourFilter::New();
cont1->SetInput(g);
cont1->SetValue(0,0.0001);
cont1->Update();
The polydatamapper follows all this and all in all a pretty standard
VTK pipeline. I know for sure that the data is not corrupted. It reads
okay and I can get the dataset info without any problems. Having to copy
the grid, that's something I'm fixing right now, for some reason the
reader releases the data too early, but that's not the problem.
I've checked the memory maps, the program is not running out of memory.
When it's running, the maximum amount of memory it uses is about 100 Mb, I
have 256 to spare. Same thing happens on a machine with 512 Mb RAM (an
Origin 200)
The dataset is pretty big: 793800 points.
Here's the output from dbx when it crashes.
(dbx) where
> 0 vtkMergePoints::InsertUniquePoint(float*,int&)(this = 0x116a7200, x =
0x7fff2848, id = 0x7fff285c)
["/local/Develop/vtk31/common/vtkIdList.h":65, 0x1016ce38]
1
vtkVoxel::Contour(float,vtkScalars*,vtkPointLocator*,vtkCellArray*,vtkCellArray*,vtkCellArray*,vtkPointData*,vtkPointData*,vtkCellData*,int,vtkCellData*)(this
= 0x116094e0, value = 9.9999997473787516e-05, cellScalars = 0x116a6950,
locator = 0x116a7200, <no name> = 0x1165b7e8, <no name> = 0x11674860,
polys = 0x1168d8d8, inPd = 0x11608f20, outPd = 0x1160e080, inCd =
0x11609000, cellId = 310813, outCd = 0x1160e160)
["/local/Develop/vtk31/common/vtkVoxel.cxx":366, 0x1034a8d4]
2 vtkContourFilter::Execute(void)(this = 0x1160de90)
["/local/Develop/vtk31/graphics/vtkContourFilter.cxx":203, 0x101644c8]
3 vtkSource::UpdateData(vtkDataObject*)(this = 0x1160de90, <no name> =
0x1160df20) ["/local/Develop/vtk31/common/vtkSource.cxx":370, 0x10241ba4]
4 vtkDataObject::UpdateData(void)(this = 0x1160df20)
["/local/Develop/vtk31/common/vtkDataObject.cxx":289, 0x1022b504]
5 vtkDataObject::Update(void)(this = 0x1160df20)
["/local/Develop/vtk31/common/vtkDataObject.cxx":187, 0x1022af54]
6 vtkSource::Update(void)(this = 0x1160de90)
["/local/Develop/vtk31/common/vtkSource.cxx":152, 0x10240fa8]
7 ::main(argc = 1, argv = 0x7fff2f34)
["/local/LCATests/LCAVision2.0/LCAVision/LCATest.cxx":76, 0x100454a4]
8 __start()
["/xlv55/kudzu-apr12/work/irix/lib/libc/libc_n32_M3/csu/crt1text.s":177,
0x10044d38]
This is a pretty standard code, I think. Is it possible that I'm running
against some kind of maximum array sizes or something? I'm just really
lost at this point.
TIA.
-- G. Wind.
NCSA, UIUC
//***********************************************
-- There is always a way,
you just have to find it.
(B.Hambly "Children Of The Jedi")
//***********************************************
More information about the vtkusers
mailing list