[Ves] Sample VES Application in iOS

Aashish Chaudhary aashish.chaudhary at kitware.com
Mon Jan 7 13:24:25 EST 2013


Have a look at this test:

http://vtk.org/gitweb?p=VES.git;a=blob;f=src/kiwi/Testing/TestTexturedBackground.cpp;h=fe6959f29159664c7c726cc72f1b26d078424278;hb=refs/heads/master


Specially this function:

oid loadData(const std::string &filename, const std::string &imageFilename)
106<http://vtk.org/gitweb?p=VES.git;a=blob;f=src/kiwi/Testing/TestTexturedBackground.cpp;h=fe6959f29159664c7c726cc72f1b26d078424278;hb=refs/heads/master#l106>
 {
107<http://vtk.org/gitweb?p=VES.git;a=blob;f=src/kiwi/Testing/TestTexturedBackground.cpp;h=fe6959f29159664c7c726cc72f1b26d078424278;hb=refs/heads/master#l107>
   this->unloadData();
108<http://vtk.org/gitweb?p=VES.git;a=blob;f=src/kiwi/Testing/TestTexturedBackground.cpp;h=fe6959f29159664c7c726cc72f1b26d078424278;hb=refs/heads/master#l108>
109<http://vtk.org/gitweb?p=VES.git;a=blob;f=src/kiwi/Testing/TestTexturedBackground.cpp;h=fe6959f29159664c7c726cc72f1b26d078424278;hb=refs/heads/master#l109>
   vesKiwiDataLoader loader;
110<http://vtk.org/gitweb?p=VES.git;a=blob;f=src/kiwi/Testing/TestTexturedBackground.cpp;h=fe6959f29159664c7c726cc72f1b26d078424278;hb=refs/heads/master#l110>
   vtkSmartPointer<vtkPolyData> polyData =
111<http://vtk.org/gitweb?p=VES.git;a=blob;f=src/kiwi/Testing/TestTexturedBackground.cpp;h=fe6959f29159664c7c726cc72f1b26d078424278;hb=refs/heads/master#l111>
     vtkPolyData::SafeDownCast(loader.loadDataset(filename));
112<http://vtk.org/gitweb?p=VES.git;a=blob;f=src/kiwi/Testing/TestTexturedBackground.cpp;h=fe6959f29159664c7c726cc72f1b26d078424278;hb=refs/heads/master#l112>
   assert(polyData.GetPointer());
113<http://vtk.org/gitweb?p=VES.git;a=blob;f=src/kiwi/Testing/TestTexturedBackground.cpp;h=fe6959f29159664c7c726cc72f1b26d078424278;hb=refs/heads/master#l113>
114<http://vtk.org/gitweb?p=VES.git;a=blob;f=src/kiwi/Testing/TestTexturedBackground.cpp;h=fe6959f29159664c7c726cc72f1b26d078424278;hb=refs/heads/master#l114>
   vesKiwiPolyDataRepresentation* rep = new
vesKiwiPolyDataRepresentation();
115<http://vtk.org/gitweb?p=VES.git;a=blob;f=src/kiwi/Testing/TestTexturedBackground.cpp;h=fe6959f29159664c7c726cc72f1b26d078424278;hb=refs/heads/master#l115>
   rep->initializeWithShader(this->ShaderProgram);
116<http://vtk.org/gitweb?p=VES.git;a=blob;f=src/kiwi/Testing/TestTexturedBackground.cpp;h=fe6959f29159664c7c726cc72f1b26d078424278;hb=refs/heads/master#l116>
   rep->setPolyData(polyData);
117<http://vtk.org/gitweb?p=VES.git;a=blob;f=src/kiwi/Testing/TestTexturedBackground.cpp;h=fe6959f29159664c7c726cc72f1b26d078424278;hb=refs/heads/master#l117>
   rep->addSelfToRenderer(this->renderer());
118<http://vtk.org/gitweb?p=VES.git;a=blob;f=src/kiwi/Testing/TestTexturedBackground.cpp;h=fe6959f29159664c7c726cc72f1b26d078424278;hb=refs/heads/master#l118>
   this->DataRep = rep;
119<http://vtk.org/gitweb?p=VES.git;a=blob;f=src/kiwi/Testing/TestTexturedBackground.cpp;h=fe6959f29159664c7c726cc72f1b26d078424278;hb=refs/heads/master#l119>
120<http://vtk.org/gitweb?p=VES.git;a=blob;f=src/kiwi/Testing/TestTexturedBackground.cpp;h=fe6959f29159664c7c726cc72f1b26d078424278;hb=refs/heads/master#l120>
   this->setBackgroundImage(imageFilename);
121<http://vtk.org/gitweb?p=VES.git;a=blob;f=src/kiwi/Testing/TestTexturedBackground.cpp;h=fe6959f29159664c7c726cc72f1b26d078424278;hb=refs/heads/master#l121>
 }


On Mon, Jan 7, 2013 at 1:18 PM, Aashish Chaudhary <
aashish.chaudhary at kitware.com> wrote:

> Hi,
>
> You can certainly do this. VES can be fed vtkPolyData which could define a
> line or a line loop. VES does not uses vtk smart pointers but uses new C++
> smart pointers which are very well supported on different platforms.
>
> Under the source code, have a look at
>
> root/ves/testing
>
> or
> root/kiwi/testing
>
> and there you will find simple examples.
>
> Hope this helps,
> Aashish
>
>
> On Mon, Jan 7, 2013 at 12:27 PM, SHAMSUDHEEN TK <shamsutk87 at gmail.com>wrote:
>
>> I'm really newbie with *VTK* and *VES*.
>>
>> I have successfully built the *VES* and have run the *Kiwi* example (
>> which is too complex and only used to read data) in my simulator.
>>
>> Now I want to draw a simple line using *VES*, same as this *VTK sample*application<http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Line>do (I have done the
>> *Xcode* configuration settings to build *VES*).
>>
>> I know that the above *VTK* application will not compile on *iOS*because a lot of
>> *VTK* code is based on the *OpenGL* rendering API which is not available
>> on handhelds.
>>
>> I understood that *VES* provides a rendering engine (based on *OpenGL ES*)
>> which is totally different as the one implied in *VTK*.
>>
>> I'm unable to find some *VTK* equivalent classes in *VES*, example like *
>> vtkSmartPointer*
>>
>> So could anyone recommend me a simple guide to draw a line using *VES* ?
>> or any reference links.
>>
>> Thanks.
>>
>> _______________________________________________
>> Ves mailing list
>> Ves at public.kitware.com
>> http://public.kitware.com/cgi-bin/mailman/listinfo/ves
>>
>>
>
>
> --
> | Aashish Chaudhary
> | R&D Engineer
> | Kitware Inc.
> | www.kitware.com
>



-- 
| Aashish Chaudhary
| R&D Engineer
| Kitware Inc.
| www.kitware.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20130107/917336a7/attachment-0001.html>


More information about the Ves mailing list