<div dir="ltr">Hi Again,<br><br>In addition,<br>I'd like to ask about vtkPolyDataWriter: <br>I set scalars on vtkPolyData and would like to save both the vtkPolyData with his scalars (it means that I'd like to save the colored surface).<br>
<br>How should I do this?<br><br><div class="gmail_quote">On Sat, Jan 7, 2012 at 7:29 PM, Miri Trope <span dir="ltr"><<a href="mailto:miritrope@gmail.com">miritrope@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div><div></div><div class="h5"><div dir="ltr">Hi All,<br><br>I'm new to vtk and would like to represent some specific colors on my vtkPolyData by vtkFloatArray. <br>Until
now, I managed to do that in the following way but more colors have
been represented than I wanted (actually, four colors).<br>
<br>//calculating my vtkFloatArray<br> myVtkFloatArray-><div dir="ltr">SetNumberOfComponents(1);<br><div dir="ltr"> myVtkFloatArray->SetNumberOfValues(numPoints);<br> myVtkFloatArray->SetValue(ind, someVal);<br>
<br>//setting this array on mySurface scalars<br>
mySurface->GetPointData()->SetScalars(myVtkFloatArray);<br> <br>In that way I visualize the colored surface on the 3d window (of Mitk) without the need to use the vtkRendererWindow. <br>Now,
I'd like to set a specific color for each range of values from
myVtkFloatArray and represent less colors then are being represented now
(remove one color from the middle so it will be represented just three colors, not four). <br>
<br>I searched in web and found out that look up table can satisfy my
needs, but I haven't found a method without the use of vtkRendererWindow
(which I don't need, I already have a window, as I mentioned above).<br><br>
How should I do that?<br><br>Any help would be very appreciated.</div></div><div style="display:inline"></div></div>
</div></div></blockquote></div><br><div style="display:inline" id="avg_ls_inline_popup"></div><style type="text/css">#avg_ls_inline_popup { position:absolute; z-index:9999; padding: 0px 0px; margin-left: 0px; margin-top: 0px; width: 240px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 13px;}</style></div>