WrapITK and Java Bindings

View: New views
11 Messages — Rating Filter:   Alert me  

WrapITK and Java Bindings

by Julien Michel-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear ITK Users (and WrapITK developpers),

I was wondering if there is any way to generate javadoc documentation
for java wrapped classes (extracted from doxygen tags in the C++ code)
so as to get the documentation corresponding to the java classes ?

Many thanks,

Julien
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Julien MICHEL - Ingénieur d'études - Traitement d'images
CS Systèmes d'Information - Division ESPACE
Département Information Géographique & Image
Téléphone : +33 561 17 64 27
Email : julien.michel@...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.html

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users

Re: WrapITK and Java Bindings

by Luis Ibanez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Julien,

This is a very interesting question.

Yes, this could be done...  (...but....)


1) When you wrap ITK with WrapITK for Java,
     the java files are generated in the directory:

    ${ITK_BIN}/Wrapping/WrapITK/Java/InsightToolkit

2) You could go there and run javadoc with a command
     such as

            javadoc -J-Xmx100m -d Documentation  itkA*.java

     Note that for my test I limited the list to the ITK classes
     whose name starts with "A".... (you probably will do it
     with all the *.java files.

3)  This effectively generates the HTML files in the
      "Documentation" directory (that was the argument of
      the -d option of javadoc)

4) ...but...
      Since the wrapping process has not carried the C++
      documentation comments down to the .java files,
      javadoc can only produce the raw documentation
      that describes the class hierarchies and the function
      arguments of every class.

5)   For this to be really useful, we would have to modify
      the wrapping process in order to carry along the C++
      comments above all the ITK classes and methods,
      to make that information available to javadoc at the
      level of the Java files.

Would you like to give it a shot at implementing such
feature in WrapITK ?

or, would you like at least to report this as a
"feature request" in the Bug tracker ?

http://public.kitware.com/Bug/my_view_page.php



      Thanks


              Luis


------------------------------------------------------------
On Wed, Nov 4, 2009 at 8:07 AM, Julien Michel <julien.michel@...> wrote:

> Dear ITK Users (and WrapITK developpers),
>
> I was wondering if there is any way to generate javadoc documentation for
> java wrapped classes (extracted from doxygen tags in the C++ code) so as to
> get the documentation corresponding to the java classes ?
>
> Many thanks,
>
> Julien
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Julien MICHEL - Ingénieur d'études - Traitement d'images
> CS Systèmes d'Information - Division ESPACE
> Département Information Géographique & Image
> Téléphone : +33 561 17 64 27
> Email : julien.michel@...
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.html

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users

Re: WrapITK and Java Bindings

by Julien Michel-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Luis Ibanez a écrit :

> Hi Julien,
>
> This is a very interesting question.
>
> Yes, this could be done...  (...but....)
>
>
> 1) When you wrap ITK with WrapITK for Java,
>      the java files are generated in the directory:
>
>     ${ITK_BIN}/Wrapping/WrapITK/Java/InsightToolkit
>
> 2) You could go there and run javadoc with a command
>      such as
>
>             javadoc -J-Xmx100m -d Documentation  itkA*.java
>
>      Note that for my test I limited the list to the ITK classes
>      whose name starts with "A".... (you probably will do it
>      with all the *.java files.
>
> 3)  This effectively generates the HTML files in the
>       "Documentation" directory (that was the argument of
>       the -d option of javadoc)
>
> 4) ...but...
>       Since the wrapping process has not carried the C++
>       documentation comments down to the .java files,
>       javadoc can only produce the raw documentation
>       that describes the class hierarchies and the function
>       arguments of every class.
>
> 5)   For this to be really useful, we would have to modify
>       the wrapping process in order to carry along the C++
>       comments above all the ITK classes and methods,
>       to make that information available to javadoc at the
>       level of the Java files.
>
> Would you like to give it a shot at implementing such
> feature in WrapITK ?
>
> or, would you like at least to report this as a
> "feature request" in the Bug tracker ?
>
> http://public.kitware.com/Bug/my_view_page.php

Dear Luis,

I came to the same conclusion : one can generate the javadoc, but it is
not very useful without importing proper information from the C++
doxygen comments.

I may have to solve this issue for some of our needs, and in this case I
would of course be glad to contribute a new feature to WrapITK. However,
I am quite new to swig and WrapITK, so I would need more information on
how (and where) to start.

Regards,

Julien
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Julien MICHEL - Ingénieur d'études - Traitement d'images
CS Systèmes d'Information - Division ESPACE
Département Information Géographique & Image
Téléphone : +33 561 17 64 27
Email : julien.michel@...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.html

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users

Re: WrapITK and Java Bindings

by Gaëtan Lehmann-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Le 10 nov. 09 à 16:31, Julien Michel a écrit :

> Luis Ibanez a écrit :
>> Hi Julien,
>> This is a very interesting question.
>> Yes, this could be done...  (...but....)
>> 1) When you wrap ITK with WrapITK for Java,
>>     the java files are generated in the directory:
>>    ${ITK_BIN}/Wrapping/WrapITK/Java/InsightToolkit
>> 2) You could go there and run javadoc with a command
>>     such as
>>            javadoc -J-Xmx100m -d Documentation  itkA*.java
>>     Note that for my test I limited the list to the ITK classes
>>     whose name starts with "A".... (you probably will do it
>>     with all the *.java files.
>> 3)  This effectively generates the HTML files in the
>>      "Documentation" directory (that was the argument of
>>      the -d option of javadoc)
>> 4) ...but...
>>      Since the wrapping process has not carried the C++
>>      documentation comments down to the .java files,
>>      javadoc can only produce the raw documentation
>>      that describes the class hierarchies and the function
>>      arguments of every class.
>> 5)   For this to be really useful, we would have to modify
>>      the wrapping process in order to carry along the C++
>>      comments above all the ITK classes and methods,
>>      to make that information available to javadoc at the
>>      level of the Java files.
>> Would you like to give it a shot at implementing such
>> feature in WrapITK ?
>> or, would you like at least to report this as a
>> "feature request" in the Bug tracker ?
>> http://public.kitware.com/Bug/my_view_page.php
>
> Dear Luis,
>
> I came to the same conclusion : one can generate the javadoc, but it  
> is not very useful without importing proper information from the C++  
> doxygen comments.
>
> I may have to solve this issue for some of our needs, and in this  
> case I would of course be glad to contribute a new feature to  
> WrapITK. However, I am quite new to swig and WrapITK, so I would  
> need more information on how (and where) to start.

Hi Julien,

There is already a doc generator for python in WrapITK 0.3.0 - it puts  
the same doc as in doxygen in python docstrings. See the code in

   http://code.google.com/p/wrapitk/source/browse/#svn/trunk/Languages/ 
Doc

Unfortunately, javadoc does not use the same mechanisms and is not  
well integrated in swig.

   http://www.swig.org/Doc1.3/Java.html#javadoc_comments

Anyway, It should be possible to do something for java similar to what  
is done for python.

Patches are welcome!

Regards,

Gaëtan

--
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr  http://www.itk.org
http://www.mandriva.org  http://www.bepo.fr



_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.html

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users

PGP.sig (210 bytes) Download Attachment

Re: WrapITK and Java Bindings

by Julien Michel-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Gaëtan Lehmann a écrit :

>
> Le 10 nov. 09 à 16:31, Julien Michel a écrit :
>
>> Luis Ibanez a écrit :
>>> Hi Julien,
>>> This is a very interesting question.
>>> Yes, this could be done...  (...but....)
>>> 1) When you wrap ITK with WrapITK for Java,
>>>     the java files are generated in the directory:
>>>    ${ITK_BIN}/Wrapping/WrapITK/Java/InsightToolkit
>>> 2) You could go there and run javadoc with a command
>>>     such as
>>>            javadoc -J-Xmx100m -d Documentation  itkA*.java
>>>     Note that for my test I limited the list to the ITK classes
>>>     whose name starts with "A".... (you probably will do it
>>>     with all the *.java files.
>>> 3)  This effectively generates the HTML files in the
>>>      "Documentation" directory (that was the argument of
>>>      the -d option of javadoc)
>>> 4) ...but...
>>>      Since the wrapping process has not carried the C++
>>>      documentation comments down to the .java files,
>>>      javadoc can only produce the raw documentation
>>>      that describes the class hierarchies and the function
>>>      arguments of every class.
>>> 5)   For this to be really useful, we would have to modify
>>>      the wrapping process in order to carry along the C++
>>>      comments above all the ITK classes and methods,
>>>      to make that information available to javadoc at the
>>>      level of the Java files.
>>> Would you like to give it a shot at implementing such
>>> feature in WrapITK ?
>>> or, would you like at least to report this as a
>>> "feature request" in the Bug tracker ?
>>> http://public.kitware.com/Bug/my_view_page.php
>>
>> Dear Luis,
>>
>> I came to the same conclusion : one can generate the javadoc, but it
>> is not very useful without importing proper information from the C++
>> doxygen comments.
>>
>> I may have to solve this issue for some of our needs, and in this case
>> I would of course be glad to contribute a new feature to WrapITK.
>> However, I am quite new to swig and WrapITK, so I would need more
>> information on how (and where) to start.
>
>
> Hi Julien,
>
> There is already a doc generator for python in WrapITK 0.3.0 - it puts
> the same doc as in doxygen in python docstrings. See the code in
>
>   http://code.google.com/p/wrapitk/source/browse/#svn/trunk/Languages/Doc
>
> Unfortunately, javadoc does not use the same mechanisms and is not well
> integrated in swig.
>
>   http://www.swig.org/Doc1.3/Java.html#javadoc_comments
>
> Anyway, It should be possible to do something for java similar to what
> is done for python.

Gaetan, Luis,

In order to understand the process I tried to generate docstring for
python, but I did not manage to do it.

In Guide.txt, it is said that one has to set the DOXYGEN_MAN_PATH when
configuring in cmake but I never get this variable and I can not find
the make_doxygen_config.py in Python directory in the binary directory.

I must have missed something, but what ? Doxygen is correctly found on
my system in WrapITK and ITK (I set BUILD_DOXYGEN to ON).

Any idea ?

Regards,

Julien
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Julien MICHEL - Ingénieur d'études - Traitement d'images
CS Systèmes d'Information - Division ESPACE
Département Information Géographique & Image
Téléphone : +33 561 17 64 27
Email : julien.michel@...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.html

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users

Re: WrapITK and Java Bindings

by Gaëtan Lehmann-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Le 12 nov. 09 à 18:45, Julien Michel a écrit :

> Gaëtan Lehmann a écrit :
>> Le 10 nov. 09 à 16:31, Julien Michel a écrit :
>>> Luis Ibanez a écrit :
>>>> Hi Julien,
>>>> This is a very interesting question.
>>>> Yes, this could be done...  (...but....)
>>>> 1) When you wrap ITK with WrapITK for Java,
>>>>    the java files are generated in the directory:
>>>>   ${ITK_BIN}/Wrapping/WrapITK/Java/InsightToolkit
>>>> 2) You could go there and run javadoc with a command
>>>>    such as
>>>>           javadoc -J-Xmx100m -d Documentation  itkA*.java
>>>>    Note that for my test I limited the list to the ITK classes
>>>>    whose name starts with "A".... (you probably will do it
>>>>    with all the *.java files.
>>>> 3)  This effectively generates the HTML files in the
>>>>     "Documentation" directory (that was the argument of
>>>>     the -d option of javadoc)
>>>> 4) ...but...
>>>>     Since the wrapping process has not carried the C++
>>>>     documentation comments down to the .java files,
>>>>     javadoc can only produce the raw documentation
>>>>     that describes the class hierarchies and the function
>>>>     arguments of every class.
>>>> 5)   For this to be really useful, we would have to modify
>>>>     the wrapping process in order to carry along the C++
>>>>     comments above all the ITK classes and methods,
>>>>     to make that information available to javadoc at the
>>>>     level of the Java files.
>>>> Would you like to give it a shot at implementing such
>>>> feature in WrapITK ?
>>>> or, would you like at least to report this as a
>>>> "feature request" in the Bug tracker ?
>>>> http://public.kitware.com/Bug/my_view_page.php
>>>
>>> Dear Luis,
>>>
>>> I came to the same conclusion : one can generate the javadoc, but  
>>> it is not very useful without importing proper information from  
>>> the C++ doxygen comments.
>>>
>>> I may have to solve this issue for some of our needs, and in this  
>>> case I would of course be glad to contribute a new feature to  
>>> WrapITK. However, I am quite new to swig and WrapITK, so I would  
>>> need more information on how (and where) to start.
>> Hi Julien,
>> There is already a doc generator for python in WrapITK 0.3.0 - it  
>> puts the same doc as in doxygen in python docstrings. See the code in
>>  http://code.google.com/p/wrapitk/source/browse/#svn/trunk/ 
>> Languages/Doc
>> Unfortunately, javadoc does not use the same mechanisms and is not  
>> well integrated in swig.
>>  http://www.swig.org/Doc1.3/Java.html#javadoc_comments
>> Anyway, It should be possible to do something for java similar to  
>> what is done for python.
>
> Gaetan, Luis,
>
> In order to understand the process I tried to generate docstring for  
> python, but I did not manage to do it.
>
> In Guide.txt, it is said that one has to set the DOXYGEN_MAN_PATH  
> when configuring in cmake but I never get this variable and I can  
> not find the make_doxygen_config.py in Python directory in the  
> binary directory.
>
> I must have missed something, but what ? Doxygen is correctly found  
> on my system in WrapITK and ITK (I set BUILD_DOXYGEN to ON).
>
> Any idea ?

Hi Julien,

Sorry for the late reply,

Guide.txt is outdated. You have to turn on WRAP_ITK_DOC to build the  
python doc currently.

I'm afraid there is not much documentation about that for now. Please  
just call me if to dive in that subject - it may be easier to explain  
how it work that way.

Regards,

Gaëtan

--
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr  http://www.itk.org
http://www.mandriva.org  http://www.bepo.fr



_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.html

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users

PGP.sig (210 bytes) Download Attachment

Re: WrapITK and Java Bindings

by Julien Michel-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Gaëtan Lehmann a écrit :

> Hi Julien,
>
> Sorry for the late reply,
>
> Guide.txt is outdated. You have to turn on WRAP_ITK_DOC to build the
> python doc currently.
>
> I'm afraid there is not much documentation about that for now. Please
> just call me if to dive in that subject - it may be easier to explain
> how it work that way.
>
> Regards,

Thank you Gaetan. I managed to figure this out by myself. I spotted a
possible mistake in Languages/Doc/CMakeLists.txt:62
in STRING(TOLOWER ...) it seems that xmlname and ${xmlname} are inverted
(once switched I got no more warning about missing doc files).

I did modify the itk_doxy2swig.py so as to get javadoc documentation as
well in the generated *_doc.i using the following workaround from swig:
http://www.swig.org/Doc1.3/Java.html#javadoc_comments

Now, I am just missing one more step to import this documentation when
generating java proxy classes (maybe I missed something in
Languages/Java/CMakeLists.txt).

Thank you very much for your help, I might call you if I need to.

Regards,

Julien
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Julien MICHEL - Ingénieur d'études - Traitement d'images
CS Systèmes d'Information - Division ESPACE
Département Information Géographique & Image
Téléphone : +33 561 17 64 27
Email : julien.michel@...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.html

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users

Re: WrapITK and Java Bindings

by Julien Michel-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Gaetan, Luis,

Just to let you know, I managed to update the itk_doxy2swig.py script so
as to get the doxygen information imported into javadoc comments in the
java proxy classes. I am only missing a few things :
- gccxml (ot pygccxml) seems to strip newlines so the imported doc is a
little compact (hard to read)
- I have trouble tranlating the \See to @see, since the name of classes
changes (because of mangling)
- Something more annoying : sometimes the proxy classes does not inherit
from its real superclass but rather from myClass_Superclass, which has
no documentation. Therefore, the inheritance scheme in javadoc is broken.
- For now I did not tranlate \param to @param and \return to @return

Any idea on how to fix those points ? I shall send you a patch as soon
as these points have been adressed.

Regards,

Julien
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Julien MICHEL - Ingénieur d'études - Traitement d'images
CS Systèmes d'Information - Division ESPACE
Département Information Géographique & Image
Téléphone : +33 561 17 64 27
Email : julien.michel@...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.html

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users

Re: WrapITK and Java Bindings

by Gaëtan Lehmann-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Le 24 nov. 09 à 10:58, Julien Michel a écrit :

> Gaetan, Luis,
>

Hi Julien,

> Just to let you know, I managed to update the itk_doxy2swig.py  
> script so as to get the doxygen information imported into javadoc  
> comments in the java proxy classes. I am only missing a few things :
> - gccxml (ot pygccxml) seems to strip newlines so the imported doc  
> is a little compact (hard to read)

gccxml, pygccxml and igenerator.py are fully reconstructing the  
classes definitions. They are not manipulating the documentation at all.
The problem is more likely in itk_doxy2swig.py or in swig.

> - I have trouble tranlating the \See to @see, since the name of  
> classes changes (because of mangling)

yes, it would be a bit hard to revert an c++ class name to a class  
name available in java, at least because there are often several  
classes in java for one class in c++

> - Something more annoying : sometimes the proxy classes does not  
> inherit from its real superclass but rather from myClass_Superclass,  
> which has no documentation. Therefore, the inheritance scheme in  
> javadoc is broken.

We should have the doc for those class as well - it looks like a bug  
in the doc translation process.
I'll try to have a look.

> - For now I did not tranlate \param to @param and \return to @return
>
> Any idea on how to fix those points ? I shall send you a patch as  
> soon as these points have been adressed.


Would you agree to share your changes before everything is fixed?
It would make things easier to review :-)

Gaëtan

--
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr  http://www.itk.org
http://www.mandriva.org  http://www.bepo.fr



_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.html

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users

PGP.sig (210 bytes) Download Attachment

Re: WrapITK and Java Bindings

by Julien Michel-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Gaëtan Lehmann a écrit :

> Hi Julien,
>
>> Just to let you know, I managed to update the itk_doxy2swig.py script
>> so as to get the doxygen information imported into javadoc comments in
>> the java proxy classes. I am only missing a few things :
>> - gccxml (ot pygccxml) seems to strip newlines so the imported doc is
>> a little compact (hard to read)
>
> gccxml, pygccxml and igenerator.py are fully reconstructing the classes
> definitions. They are not manipulating the documentation at all.
> The problem is more likely in itk_doxy2swig.py or in swig.

Well, itk_doxy2swig.py is parsing xml documentation file to build python
docstrings (and now javadoc). I was assuming that these xml doc files
were produced by gccxml or pygccxml (but I might be wrong).

>> - Something more annoying : sometimes the proxy classes does not
>> inherit from its real superclass but rather from myClass_Superclass,
>> which has no documentation. Therefore, the inheritance scheme in
>> javadoc is broken.
>
> We should have the doc for those class as well - it looks like a bug in
> the doc translation process.
> I'll try to have a look.

Well, it sounds more like a bug (or a feature ? ;)) from swig to me.

For instance :

itkAtanImageFilterIIF2_IIF2 is inheriting from
itkAtanImageFilterIIF2_IIF2_Superclass, which should rather be
itkUnaryFunctorImageFilterIIF2_IIF2_Tan or something like this.

Maybe it is just a problem of mangling ...

Julien
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Julien MICHEL - Ingénieur d'études - Traitement d'images
CS Systèmes d'Information - Division ESPACE
Département Information Géographique & Image
Téléphone : +33 561 17 64 27
Email : julien.michel@...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.html

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users

Re: WrapITK and Java Bindings

by Gaëtan Lehmann-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Le 24 nov. 09 à 18:04, Julien Michel a écrit :

> Gaëtan Lehmann a écrit :
>
>> Hi Julien,
>>> Just to let you know, I managed to update the itk_doxy2swig.py  
>>> script so as to get the doxygen information imported into javadoc  
>>> comments in the java proxy classes. I am only missing a few things :
>>> - gccxml (ot pygccxml) seems to strip newlines so the imported doc  
>>> is a little compact (hard to read)
>> gccxml, pygccxml and igenerator.py are fully reconstructing the  
>> classes definitions. They are not manipulating the documentation at  
>> all.
>> The problem is more likely in itk_doxy2swig.py or in swig.
>
> Well, itk_doxy2swig.py is parsing xml documentation file to build  
> python docstrings (and now javadoc). I was assuming that these xml  
> doc files were produced by gccxml or pygccxml (but I might be wrong).
they are produced by doxygen. If the line breaks are already removed  
at this stage, it will be hard to fix this problem.

>
>>> - Something more annoying : sometimes the proxy classes does not  
>>> inherit from its real superclass but rather from  
>>> myClass_Superclass, which has no documentation. Therefore, the  
>>> inheritance scheme in javadoc is broken.
>> We should have the doc for those class as well - it looks like a  
>> bug in the doc translation process.
>> I'll try to have a look.
>
> Well, it sounds more like a bug (or a feature ? ;)) from swig to me.
>
> For instance :
>
> itkAtanImageFilterIIF2_IIF2 is inheriting from  
> itkAtanImageFilterIIF2_IIF2_Superclass, which should rather be  
> itkUnaryFunctorImageFilterIIF2_IIF2_Tan or something like this.
>
> Maybe it is just a problem of mangling ...

The name itkAtanImageFilterIF2IF2_Superclass is a feature of wrapitk :-)
The wrapper for those classes - both itkAtanImageFilterIF2IF2 and  
itkAtanImageFilterIF2IF2_Superclass is simply

   WRAP_CLASS("itk::TanImageFilter" POINTER_WITH_SUPERCLASS)
     WRAP_IMAGE_FILTER_REAL(2)
   END_WRAP_CLASS()

It makes the creation of the wrapper quite easy for this kind of  
class, where the superclass is not supposed to be used directly.
It also makes quite difficult to find the name of the the super class  
only with the informations there.

That's probably why those classes don't have there doc, but I have to  
have a closer look.

Gaëtan




--
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr  http://www.itk.org
http://www.mandriva.org  http://www.bepo.fr



_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.html

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users

PGP.sig (210 bytes) Download Attachment