[Ves] Documentation, resources and help.

Pat Marion pat.marion at kitware.com
Sun Jun 24 18:31:06 EDT 2012


Hi Wallas,

Unfortunately, the instructions you are following on the wiki are slightly
out of date.  The code has changed so the line numbers are not correct
anymore.  Fortunately, there is a topic branch available that provides the
brain atlas demo.  You don't have to uncomment any code, and you don't have
to download data files and add them to xcode.

cd to your VES source directory and revert your changes.  Then run these
git commands:

git remote add -f stage git://vtk.org/stage/VES.git
git checkout -t stage/brain-atlas-demo

Now recompile and run the Kiwi iOS project and the brain atlas demo will be
available.

Pat

On Sun, Jun 24, 2012 at 11:08 AM, Wallas Henrique Sousa dos Santos <
wallashss at gmail.com> wrote:

> Thank Aashish and Bill for the explanation,
>
> Sorry for my terrible mistake, I have build the Kiwi once, and when I was
> going to try the Brain Atlas I "skipped" some steps and got wrong. I
> haven't uncommented a some lines. I'm really sorry and ashamed.
>
> But, I tried everything and what I got:
> -I didn't found 'vesKiwiViewerApp.cpp' at VES/src/vtkVES, instead I found
> it at 'VES/src/kiwi'. I have cloned the source from git again today.
> -In the file I have commented the lines, I copy & paste the context of
> lines which I've commented.
> -160-161;
>  bool vesKiwiViewerApp::vesInternal::setShaderProgramOnRepresentations(
>   vesSharedPtr<vesShaderProgram> shaderProgram)
> {
>   bool success = false;
>
>   for (size_t i = 0; i < this->DataRepresentations.size(); ++i) {
>     vesKiwiPolyDataRepresentation *polyDataRepresentation =
>         dynamic_cast<vesKiwiPolyDataRepresentation*>(this
> ->DataRepresentations[i]);
>
>     vesKiwiImageWidgetRepresentation *imageWidgetRepresentation =
>         dynamic_cast<vesKiwiImageWidgetRepresentation*>(this
> ->DataRepresentations[i]);
>
>     if (polyDataRepresentation) {
>       polyDataRepresentation->setShaderProgram(shaderProgram);
>       success = true;
>     }
>     else if (imageWidgetRepresentation) {
>       //imageWidgetRepresentation->setShaderProgram(shaderProgram);
> --HERE
>       //success = true;
>     }
>   }
>
>   return success;
> }
>
> -592-602;
> bool vesKiwiViewerApp::initTextureShader(const std::string& vertexSource,
>                                          const std::string&
> fragmentSource)
> {
>   vesSharedPtr<vesShaderProgram> shaderProgram
>     = this->addShaderProgram(vertexSource, fragmentSource);
>   /*this->addModelViewMatrixUniform(shaderProgram); --HERE
>   this->addProjectionMatrixUniform(shaderProgram);
>   this->addVertexPositionAttribute(shaderProgram);
>   this->addVertexTextureCoordinateAttribute(shaderProgram);
>   this->Internal->TextureShader = shaderProgram;
>   return true;
> }
>
>
> //----------------------------------------------------------------------------
> bool vesKiwiViewerApp::initGouraudTextureShader(const std::string&
> vertexSource, const std::string& fragmentSource)
> {*/
>   vesShaderProgram::Ptr shaderProgram = this->addShaderProgram(vertexSource,
> fragmentSource);
>   this->addModelViewMatrixUniform(shaderProgram);
>   this->addProjectionMatrixUniform(shaderProgram);
>   this->addNormalMatrixUniform(shaderProgram);
>   this->addVertexPositionAttribute(shaderProgram);
>   this->addVertexNormalAttribute(shaderProgram);
>   this->addVertexTextureCoordinateAttribute(shaderProgram);
>   this->Internal->GouraudTextureShader = shaderProgram;
>   return true;
> }
>
> -When I try to build again I got:
>
> [ 91%] Building CXX object
> src/kiwi/CMakeFiles/kiwi.dir/vesKiwiPlaneWidget.cpp.o
> [ 93%] Building CXX object
> src/kiwi/CMakeFiles/kiwi.dir/vesKiwiPolyDataRepresentation.cpp.o
> [ 95%] Building CXX object
> src/kiwi/CMakeFiles/kiwi.dir/vesKiwiStreamingDataRepresentation.cpp.o
> [ 96%] Building CXX object
> src/kiwi/CMakeFiles/kiwi.dir/vesKiwiText2DRepresentation.cpp.o
> [ 98%] Building CXX object
> src/kiwi/CMakeFiles/kiwi.dir/vesKiwiViewerApp.cpp.o
> /Developer/Misc/VES2/VES/src/kiwi/vesKiwiViewerApp.cpp: In member function
> ‘bool vesKiwiViewerApp::initTextureShader(const std::string&, const
> std::string&)’:
> /Developer/Misc/VES2/VES/src/kiwi/vesKiwiViewerApp.cpp:603: error:
> redeclaration of ‘std::tr1::shared_ptr<vesShaderProgram> shaderProgram’
> /Developer/Misc/VES2/VES/src/kiwi/vesKiwiViewerApp.cpp:590: error:
> ‘std::tr1::shared_ptr<vesShaderProgram> shaderProgram’ previously declared
> here
> make[6]: *** [src/kiwi/CMakeFiles/kiwi.dir/vesKiwiViewerApp.cpp.o] Error 1
> make[5]: *** [src/kiwi/CMakeFiles/kiwi.dir/all] Error 2
> make[4]: *** [all] Error 2
> make[3]: *** [CMakeExternals/Stamp/ves-ios-device/ves-ios-device-build]
> Error 2
> make[2]: *** [CMakeFiles/ves-ios-device.dir/all] Error 2
> make[1]: *** [CMakeFiles/ves-ios-device.dir/rule] Error 2
> make: *** [ves-ios-device] Error 2
>
> Am I missing something else again?
>
> Thank All,
>
> Cheers,
> Wallas
>
>
> Em 23/06/2012, às 09:28, Aashish Chaudhary escreveu:
>
>  -I was trying the Brain Atlas demo,  followed the instructions but It
>> didn't work. I had built and run the Kiwi viewer successfully but I could
>> not load the data of brain atlas neither can_data. It doesn't apper in the
>> tableview of the app. What I have understand is to drag&drop all files on
>> Data group of the project, and it should appear in the dataset. Something
>> there I noticed was a little part of the list of files on the screenshot of
>> the wiki page doesn't have in the tgz provided on the page. For example the
>> file brain_atlas_mri.mha in the screen doesn't have in the data that I've
>> downloaded.
>>
>> -Is there more documentation, resources or tutorials? I'm have
>> difficulties to understand the library. I think just the doxygen document
>> not enough to get what I need. I swear that I search a lot for resources,
>> but I didn't have any choice than to ask...
>>
>> Sorry, you had trouble. No, we don't have a tutorial yet. If you are
> trying to use VES for Dicom Viewer, then I would suggest looking at
> the TestKiwiViewer.cpp test. For the brain atlas, you need to make sure
> data is copied to the project.
>
>
>> Sorry for any convenience or my bad text.
>>
>>  Thank you all.
>>
>>
>>
>>   *Wallas* Henrique Sousa dos Santos
>>
>> *Mestrando em Informática*
>>
>> Núcleo de Computação Aplicada - CCET - UFMA
>>
>> 55 98 8222 2000
>>
>>
>> _______________________________________________
>> 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
>
>
>  *Wallas* Henrique Sousa dos Santos
>
> *Mestrando em Informática*
>
> Núcleo de Computação Aplicada - CCET - UFMA
>
> 55 98 8222 2000
>
>
>
> Início da mensagem encaminhada:
>
> *De: *Aashish Chaudhary <aashish.chaudhary at kitware.com>
>
> *Assunto: *Re: [Ves] Documentation, resources and help.
>
> *Data: *23 de junho de 2012 09:28:08 BRT
>
> *Para: *Wallas Henrique Sousa dos Santos <wallashss at gmail.com>
>
> *Cc: *ves at public.kitware.com
>
>
>  -I was trying the Brain Atlas demo,  followed the instructions but It
>> didn't work. I had built and run the Kiwi viewer successfully but I could
>> not load the data of brain atlas neither can_data. It doesn't apper in the
>> tableview of the app. What I have understand is to drag&drop all files on
>> Data group of the project, and it should appear in the dataset. Something
>> there I noticed was a little part of the list of files on the screenshot of
>> the wiki page doesn't have in the tgz provided on the page. For example the
>> file brain_atlas_mri.mha in the screen doesn't have in the data that I've
>> downloaded.
>>
>> -Is there more documentation, resources or tutorials? I'm have
>> difficulties to understand the library. I think just the doxygen document
>> not enough to get what I need. I swear that I search a lot for resources,
>> but I didn't have any choice than to ask...
>>
>> Sorry, you had trouble. No, we don't have a tutorial yet. If you are
> trying to use VES for Dicom Viewer, then I would suggest looking at
> the TestKiwiViewer.cpp test. For the brain atlas, you need to make sure
> data is copied to the project.
>
>
>> Sorry for any convenience or my bad text.
>>
>>  Thank you all.
>>
>>
>>
>>   *Wallas* Henrique Sousa dos Santos
>>
>> *Mestrando em Informática*
>>
>> Núcleo de Computação Aplicada - CCET - UFMA
>>
>> 55 98 8222 2000
>>
>>
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> Ves mailing list
> Ves at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/ves
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20120624/3825b6c6/attachment-0001.html>


More information about the Ves mailing list