Hi Andreas,
Thanks for your support, by the way, I really appreciate it!
Here’s the grid before it goes into the ExtractUnstructuredGrid
:
vtkUnstructuredGrid (00000186E23E67F0)
Debug: Off
Modified Time: 2507
Reference Count: 1
Registered Events: (none)
Information: 00000186E24D6510
Data Released: False
Global Release Data: Off
UpdateTime: 0
Field Data:
Debug: Off
Modified Time: 2462
Reference Count: 1
Registered Events: (none)
Number Of Arrays: 0
Number Of Components: 0
Number Of Tuples: 0
Number Of Points: 7551512
Number Of Cells: 0
Cell Data:
Debug: Off
Modified Time: 2506
Reference Count: 1
Registered Events:
Registered Observers:
vtkObserver (00000186EECD8B90)
Event: 33
EventName: ModifiedEvent
Command: 00000186E24D61A0
Priority: 0
Tag: 1
Number Of Arrays: 1
Array 0 name = density
Number Of Components: 1
Number Of Tuples: 943939
Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )
Interpolate Flags: ( 1 1 1 1 1 0 0 1 )
Pass Through Flags: ( 1 1 1 1 1 1 1 1 )
Scalars: (none)
Vectors: (none)
Normals: (none)
TCoords: (none)
Tensors: (none)
GlobalIds: (none)
PedigreeIds: (none)
EdgeFlag: (none)
Point Data:
Debug: Off
Modified Time: 2464
Reference Count: 1
Registered Events:
Registered Observers:
vtkObserver (00000186EECD8B30)
Event: 33
EventName: ModifiedEvent
Command: 00000186E24D61A0
Priority: 0
Tag: 1
Number Of Arrays: 0
Number Of Components: 0
Number Of Tuples: 0
Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )
Interpolate Flags: ( 1 1 1 1 1 0 0 1 )
Pass Through Flags: ( 1 1 1 1 1 1 1 1 )
Scalars: (none)
Vectors: (none)
Normals: (none)
TCoords: (none)
Tensors: (none)
GlobalIds: (none)
PedigreeIds: (none)
EdgeFlag: (none)
Bounds:
Xmin,Xmax: (-0.02698, 85.028)
Ymin,Ymax: (-0.073318, 24.311)
Zmin,Zmax: (-0.061071, 80.059)
Compute Time: 2509
Number Of Points: 7551512
Point Coordinates: 00000186E07370B0
Locator: 0000000000000000
Number Of Pieces: 1
Piece: -1
Ghost Level: 0
So there are points but no cells.
Here’s how I constructed the grid to begin with:
auto ugrid = gridPointer::New();
auto points = vtkSmartPointer<vtkPoints>::New();
points->Allocate(voxels.size() * 8);
ugrid->Allocate(voxels.size());
int curr_id = 0;
auto vtk_voxel = vtkSmartPointer<vtkVoxel>::New();
for (auto const& voxel : voxels) {
auto min_corner = voxel.min_corner;
auto max_corner = voxel.max_corner;
points->InsertNextPoint(min_corner[0], min_corner[1], min_corner[2]);
points->InsertNextPoint(max_corner[0], min_corner[1], min_corner[2]);
points->InsertNextPoint(min_corner[0], max_corner[1], min_corner[2]);
points->InsertNextPoint(max_corner[0], max_corner[1], min_corner[2]);
points->InsertNextPoint(min_corner[0], min_corner[1], max_corner[2]);
points->InsertNextPoint(max_corner[0], min_corner[1], max_corner[2]);
points->InsertNextPoint(min_corner[0], max_corner[1], max_corner[2]);
points->InsertNextPoint(max_corner[0], max_corner[1], max_corner[2]);
vtk_voxel->GetPointIds()->SetId(0, curr_id * 8 + 0);
vtk_voxel->GetPointIds()->SetId(1, curr_id * 8 + 1);
vtk_voxel->GetPointIds()->SetId(2, curr_id * 8 + 2);
vtk_voxel->GetPointIds()->SetId(3, curr_id * 8 + 3);
vtk_voxel->GetPointIds()->SetId(4, curr_id * 8 + 4);
vtk_voxel->GetPointIds()->SetId(5, curr_id * 8 + 5);
vtk_voxel->GetPointIds()->SetId(6, curr_id * 8 + 6);
vtk_voxel->GetPointIds()->SetId(7, curr_id * 8 + 7);
ugrid->InsertNextCell(VTK_VOXEL, vtk_voxel->GetPointIds());
curr_id++;
}
ugrid->SetPoints(points);
So it appears there is some difference in behavior between Windows and Linux regarding the loop above where I fill out the voxel cell array.
I do not see output about “extract X number of cells/points”.