<div dir="ltr">No, it needs to be an unsigned char. This is because different bits from that unsigned char are used for different things.<div><br></div><div><a href="https://blog.kitware.com/ghost-and-blanking-visibility-changes/">https://blog.kitware.com/ghost-and-blanking-visibility-changes/</a><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jul 23, 2018 at 3:01 AM vacingforo <<a href="mailto:vacingforo@gmail.com">vacingforo@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello, <br>
<br>
I have the following code : <br>
<br>
vtkSmartPointer<vtkImageData> image = <br>
vtkSmartPointer<vtkImageData>::New(); <br>
image->SetSpacing(spacing); <br>
image->SetDimensions(dim); <br>
image->SetExtent(-1, dim[0] + 1, -1 , dim[1] + 1, 0, dim[2] - 1); <br>
image->SetOrigin(origin); <br>
image->AllocateScalars(VTK_UNSIGNED_CHAR, 1); <br>
<br>
vtkIdType count = image->GetNumberOfPoints(); <br>
for (vtkIdType i = 0; i < count; ++i) <br>
{ <br>
image->GetPointData()->GetScalars()->SetTuple1(i, white); <br>
} <br>
<br>
Is it possible to define array VTK_BIT(image->AllocateScalars) instead of<br>
VTK_UNSIGNED_CHAR to mask a polydata?. This is in order to reduce the size<br>
of matrix.<br>
<br>
for more details check small application main.cpp in the <br>
following link: <br>
<br>
<br>
<a href="https://drive.google.com/file/d/1FBnJw96zz5uv33uh_GYV71OAT05NngOR/view?usp=sharing" rel="noreferrer" target="_blank">https://drive.google.com/file/d/1FBnJw96zz5uv33uh_GYV71OAT05NngOR/view?usp=sharing</a><br>
<br>
<br>
Best regards, <br>
<br>
Sergio<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html</a><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</blockquote></div>