Great, glad you figured out the Calculator trick. So, to get the colors you want, rather than using integers to identify parts, you actually have to add rgb data. In vtk, this is done by creating an unsigned char array (vtkUnsignedCharArray) that has 3 components, and number of tuples == number of points on the model. Then set each tuple to the same rgb 255,255,255 for example. You should name the array 'rgb_colors'. Then merge all the models together. <br>
<br>One way to do it is with the Python programmable filter in paraview. Something like:<br><br>def makeArray(npoints):<br> colors = vtk.vtkUnsignedCharArray()<br> colors.SetName('rgb_colors')<br> #... fill in the array<br>
return colors<br><br>self.GetOutput().GetPointData().AddArray(makeArray(self.GetOutput().GetNumberOfPoints()))<br><br>Pat<br><br><br><div class="gmail_quote">On Wed, Feb 13, 2013 at 2:27 AM, Frank Millo <span dir="ltr"><<a href="mailto:frank.millo@gmail.com" target="_blank">frank.millo@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Pat,<br><br>thanks for your quick reply and suggestions. <br>I managed to package up my data and save it as .vtp and display it in Kiwi.<br>
However, the coloring is unclear to me. I used the calculator and added a scalar value (integer) for each part, it appears that it uses this value<br>
to index into a color map. I got a color per object but it is changing when I add objects or parts.<br><br>It would be great if you could provide some insight on, how to specify a distinct color for each object.<br>eg. part1 = red; part2 = blue .... <br>
<br>Again, thanks for you help.<span class="HOEnZb"><font color="#888888"><br>Frank</font></span><div class="HOEnZb"><div class="h5"><br><br><br><br><div class="gmail_quote">On Mon, Feb 11, 2013 at 11:22 PM, Pat Marion <span dir="ltr"><<a href="mailto:pat.marion@kitware.com" target="_blank">pat.marion@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Frank,<br><br>KiwiViewer 0.0.2 for iOS doesn't support the .kiwi file extension, to use the .kiwi extension you'll need to grab KiwiViewer v1.0 which is available on Android devices. The upcoming KiwiViewer v2.0 release for iOS will have support .kiwi files, and .zip directories of files.<br>
<br>For KiwiViewer 0.0.2, you can append all your .vtk files into a single .vtk file using ParaView. You can open all your files at once in ParaView, select all of them, and then apply the Append Geometry filter which you can find in the Filter --> Alphabetical menu. Then save the data using File --> Save Data. You can choose .vtk, or .vtp as the file format to save to.<br>
<br>If you want each piece to have a separate color, like the 'NAMIC Knee Atlas' dataset, you can do that with ParaView too. Let me know if that's something you want to try.<br><br>Pat<br><br><br><div class="gmail_quote">
<div><div>
On Tue, Feb 12, 2013 at 2:35 AM, Frank Millo <span dir="ltr"><<a href="mailto:frank.millo@gmail.com" target="_blank">frank.millo@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div>
Hi all,<br><br>how can I import a multi part scene into Kiwiviewer?<br>I can upload thru dropbox single .vtk files from Paraview and display them in Kiwiviewer.<br>However when using the method described in the WIKI e.g. filename,url<br>
I get the error 'No installed apps support opening this file'.<br><br>Can anyone point me to resources describing how to package up polygonal<br>meshes (.vtk format) so I can show them in Kiwiviewer? Basically I would<br>
like to create a scene with my data similar to the built in example: 'NAMIC Knee Atlas'.<br>I used ParaView version 3.8 and KiwiViewer 0.0.2<br><br>Thanks,<br>Frank<br>
<br></div></div>_______________________________________________<br>
Kiwiviewer mailing list<br>
<a href="mailto:Kiwiviewer@public.kitware.com" target="_blank">Kiwiviewer@public.kitware.com</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/kiwiviewer" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/kiwiviewer</a><br>
<br></blockquote></div><br>
</blockquote></div><br>
</div></div></blockquote></div><br>