<div dir="ltr">Sorry but it continues be confusing for me.  I don't understand the reasons. is there no way to make a mask Image with 0 and 1(bits) in order to mask polydata? </div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 23, 2018 at 5:37 PM, Dan Lipsa <span dir="ltr"><<a href="mailto:dan.lipsa@kitware.com" target="_blank">dan.lipsa@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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/" target="_blank">https://blog.kitware.com/<wbr>ghost-and-blanking-visibility-<wbr>changes/</a><br></div></div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Mon, Jul 23, 2018 at 3:01 AM vacingforo <<a href="mailto:vacingforo@gmail.com" target="_blank">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>:<wbr>: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_<wbr>UNSIGNED_CHAR, 1); <br>
<br>
    vtkIdType count = image->GetNumberOfPoints(); <br>
    for (vtkIdType i = 0; i < count; ++i) <br>
    { <br>
        image->GetPointData()-><wbr>GetScalars()->SetTuple1(i, white); <br>
    } <br>
<br>
Is it possible to define array VTK_BIT(image-><wbr>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/<wbr>d/1FBnJw96zz5uv33uh_<wbr>GYV71OAT05NngOR/view?usp=<wbr>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.<wbr>com/VTK-Users-f1224199.html</a><br>
______________________________<wbr>_________________<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/<wbr>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_<wbr>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=<wbr>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/<wbr>mailman/listinfo/vtkusers</a><br>
</blockquote></div>
</div></div></blockquote></div><br></div>