[vtkusers] vtkImageData: Is it possible to define array VTK_BIT(image->AllocateScalars) instead of VTK_UNSIGNED_CHAR to mask a polydata?
vacingforo
vacingforo at gmail.com
Mon Jul 23 03:01:11 EDT 2018
Hello,
I have the following code :
vtkSmartPointer<vtkImageData> image =
vtkSmartPointer<vtkImageData>::New();
image->SetSpacing(spacing);
image->SetDimensions(dim);
image->SetExtent(-1, dim[0] + 1, -1 , dim[1] + 1, 0, dim[2] - 1);
image->SetOrigin(origin);
image->AllocateScalars(VTK_UNSIGNED_CHAR, 1);
vtkIdType count = image->GetNumberOfPoints();
for (vtkIdType i = 0; i < count; ++i)
{
image->GetPointData()->GetScalars()->SetTuple1(i, white);
}
Is it possible to define array VTK_BIT(image->AllocateScalars) instead of
VTK_UNSIGNED_CHAR to mask a polydata?. This is in order to reduce the size
of matrix.
for more details check small application main.cpp in the
following link:
https://drive.google.com/file/d/1FBnJw96zz5uv33uh_GYV71OAT05NngOR/view?usp=sharing
Best regards,
Sergio
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
More information about the vtkusers
mailing list