[Kiwiviewer] write volume data with 3D surface

Pat Marion pat.marion at kitware.com
Tue Sep 4 16:09:27 EDT 2012


Hi,

The current version of KiwiViewer doesn't allow you to modify the in-app
menu to add additional datasets.  You might want to try the DropBox app, it
can be a convenient way to download datasets to the mobile device and
KiwiViewer can be launched by selecting a dataset in a DropBox folder.

Is it possible to send me the vtp file you are using so I can try it out?

Pat

On Mon, Sep 3, 2012 at 8:31 PM, João Domingos <joao.sousa.domingos at gmail.com
> wrote:

> Pat,
>
> I have 2 arrays in the vtkPolyData:
>
>   Number Of Arrays: 2
>   Array 0 name = ImageScalars
>   Array 1 name = Normals
>
> Deleting both does not change that.. It is still red. (I have not tried in
> Paraview)
>
> Regarding scene description files, i Meant, is there a way to make the
> .kiwi visible in the Open Data (builtin example scenes) menu? I guess,
> with your answer you meant no. Well, something for you guys to take into
> consideration for the next version.
>
> Many thanks,
> Joao
>
>
>
> On 3 September 2012 22:46, Pat Marion <pat.marion at kitware.com> wrote:
>
>> Hi Joao,
>>
>> Oh, perhaps this surface has a point data attribute array, like point ids
>> or something?  Can you open the vtp file in ParaView and see if it has an
>> attribute array?  If so, KiwiViewer will color the points using the
>> attribute array.  There is no way to disable that and use solid coloring,
>> and no way to use opacity.  If you delete the attribute array, then solid
>> coloring and opacity should work.  You could do this in your pipeline, if
>> you're using a c++ vtk pipeline, like:
>>
>> // get the poly data at the end of the pipeline
>> vtkPolyData* myData = contourFilter->GetOutput();
>>
>> // remove all point data arrays
>> while (myData->GetPointData()->GetNumberOfArrays())
>>   myData->GetPointData()->RemoveArray(0);
>>
>>
>> Regarding scene description files, KiwiViewer doesn't actually use any
>> .kiwi files for the builtin example scenes.  Most of the builtin datasets
>> are just regular surfaces.  The textured earth, brain atlas, and can
>> animation are special purpose demos, and can't be described using the
>> simple .kiwi file format.
>>
>> Pat
>>
>>
>>
>> On Mon, Sep 3, 2012 at 4:14 PM, João Domingos <
>> joao.sousa.domingos at gmail.com> wrote:
>>
>>> Hey Pat,
>>>
>>> Did some more testing and apparently the app is working fine. I was able
>>> to change colors and opacity of several datasets, except on the surface I
>>> told you about. The problem happens when you have an output of the
>>> following pipeline type:
>>>
>>> vtkPolyData()(a mesh of points) -> vtkSurfaceReconstructionFilter() ->
>>> vtkContourFilter()
>>>
>>> On the computer (meaning under normal VTK usage), this final vtkPolyData
>>> output can be represented with a different opacity
>>> (surf.GetProperty().SetOpacity(0.6) works), but color will always be red
>>> (surf.GetProperty().SetColor(0,1,0) does nothing). On the KiwiViewer color
>>> change again does not work for this surface (it is always red as in the
>>> computer) but, unexpectedly, opacity also doesn't work. Besides this
>>> specific case, I could represent my remaining datasets successfully and
>>> change colors and opacities.
>>>
>>> One question, is there a way of including the scene description files
>>> (.kiwi) with the examples KiwiViewer already has?
>>>
>>> Many thanks,
>>> Joao
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On 31 August 2012 20:06, João Domingos <joao.sousa.domingos at gmail.com>wrote:
>>>
>>>> Hi Pat,
>>>>
>>>> Good to hear from you. I tried what you gave me and still the 3D model
>>>> is completely red (tried opacity of 0.1). I'm using KiwiViewer from Android
>>>> app store on a Galaxy S3. Eventually I will try to compile my own version.
>>>> Do you have any more ideas for the opacity to work? Also, are those the
>>>> only settings we can program without compiling a copy? The 'model-tapping
>>>> to disappear function' I told you about can be simply coded in a .kiwi
>>>> metafile as well?
>>>>
>>>> Many thanks for your time,
>>>> Joao
>>>>
>>>>
>>>>
>>>> On 31 August 2012 16:17, Pat Marion <pat.marion at kitware.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Sorry I did not notice your emails earlier!  Regarding the
>>>>> transparency bug, could you try reformating your .kiwi metafile so it lists
>>>>> the volume first, then the surface, and add commas for each empty column,
>>>>> like this:
>>>>>
>>>>> filename,r,g,b,a
>>>>> 37fr15.mha,,,,
>>>>> LV_surface.vtp,1.0,0.0,0.0,0.5
>>>>>
>>>>> Does that work any better?  I've done a metafile just like this before
>>>>> with transparency on the surface and it worked correctly for me, but I can
>>>>> try again.  Are you using KiwiViewer from the Android app store, or did you
>>>>> compile your own copy for Android or iOS?
>>>>>
>>>>> For the brain atlas, I hope that in future releases the demo can be
>>>>> easily configurable for new models.  Right now you could edit the
>>>>> models.txt file and replace the filenames, colors, and labels with your
>>>>> own, but the demo does require the skin and skull models to be present, and
>>>>> the initial position & scale of the clipping plane is hard coded.
>>>>>
>>>>> Pat
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Aug 31, 2012 at 2:55 AM, João Domingos <
>>>>> joao.sousa.domingos at gmail.com> wrote:
>>>>>
>>>>>> Any help please?
>>>>>>
>>>>>> Many thanks for your time,
>>>>>> Domingos
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 26 August 2012 20:53, João Domingos <joao.sousa.domingos at gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> Also, just like in the SPL-PNL Brain Atlas, can someone please tell
>>>>>>> me how do you program a specific surface (ex: brain structure) to show its
>>>>>>> legend and appear/disappear when touched? Would like to program that
>>>>>>> function into my surface so that it could appear disappear from a metafile
>>>>>>> volume (still with slicing capability embedded).
>>>>>>>
>>>>>>> Many thanks,
>>>>>>> Domingos
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On 25 August 2012 17:07, João Domingos <
>>>>>>> joao.sousa.domingos at gmail.com> wrote:
>>>>>>>
>>>>>>>> Dear all,
>>>>>>>>
>>>>>>>> I was able to load both a metafile and a surface with the following
>>>>>>>> instructions:
>>>>>>>>
>>>>>>>> filename,r,g,b,a
>>>>>>>> LV_surface.vtp,1,0,0,0.5
>>>>>>>> 37fr15.mha
>>>>>>>>
>>>>>>>> Another question: in the presence of a metafile volume, the transparency
>>>>>>>> is not working on the surface. Do you know why? I have tried by putting
>>>>>>>> everything 1 in the .mha.. but it is the same, no opacity change on the
>>>>>>>> surface.
>>>>>>>>
>>>>>>>> Many thanks,
>>>>>>>> Joao Domingos
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On 25 August 2012 07:33, João Domingos <
>>>>>>>> joao.sousa.domingos at gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Dear all,
>>>>>>>>>
>>>>>>>>> I have opened (on a PC) a 3D volume and fitted a 3D surface and
>>>>>>>>> now I would like to save both into a file so that I can open it in the
>>>>>>>>> KiwiViewer. In the latter I can open the .mha (.raw) volume and my
>>>>>>>>> surface.vtp file. The problem is, both are opened separately. Is there a
>>>>>>>>> way to save both on the same file and then open both at the same time with
>>>>>>>>> KiwiViewer?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Many thanks,
>>>>>>>>> Domingos
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Kiwiviewer mailing list
>>>>>> Kiwiviewer at public.kitware.com
>>>>>> http://public.kitware.com/cgi-bin/mailman/listinfo/kiwiviewer
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/kiwiviewer/attachments/20120904/f71d8e40/attachment.html>


More information about the Kiwiviewer mailing list