[Qgis-developer] [QGIS Commit] SVN [ersts] r7424
Peter Ersts
ersts at amnh.org
Fri Nov 16 16:21:58 EST 2007
Martin,
I was just going to write you shortly because I need your help with it
anyway ;) The custom enhancement function is a bit of a test at the
moment anyway. As for keeping it only adding to the in the bindings that
may not be possible, in which case we may choose to remove it.
At the moment I have implemented the custom enhancement function as a
callback. The idea was to you allow the user to just pass a function
pointer to the contrast enhancement class. Your function simple needs to
take in a double and return a int. The proof-of-concept I wrote in
python (which I know next to nothing about) did work, but the same code
is not working when added to the QgsContastEnhancement class. The C++
call back works fine. Implementing it as a callback is what introduces
the dependency on python. If you have a suggestion on how to do with
from python without using a callback approach thus not introducing a
dependency on python I am very interested in hearing your idea.
On a parallel note, I also need to consider carefully the safety of
simply passing a function pointer. It may be necessary to create a more
complete plugin service that includes the equivalent of a plugin
manager. I see this feature as being very useful, and if expanded just a
little it would allow users to create a custom lookup tables on the fly
for example.
I am interested in hearing other's opinions on this as well. There is
plenty to do already in the raster branch so I need to make sure this
does not end up being a time sync. It is always something that can be
tabled for a later revision.
-pete
Martin Dobias wrote:
> Hi Peter,
>
> I've seen in your recent commit that you've added support for custom
> enhancement functions also written in Python. While this is surely a
> good idea, I would prefer to put it only to python bindings and not to
> leave it directly in core library - as this introduces dependency of
> core library on Python, which we (at least so far) want to keep
> optional.
>
> AFAIK SIP supports adding new methods in .sip files so it shouldn't be
> a big problem to move it there... Maybe I could try to help you here
> if needed.
>
> Regards
> Martin
>
>
> ---------- Forwarded message ----------
> From: <noreply at qgis.org>
> Date: Nov 16, 2007 4:02 PM
> Subject: [QGIS Commit] SVN [ersts] r7424 - in
> branches/raster_transparency_branch: python/core src/app src/core
> src/core/raster src/plugins src/plugins/georeferencer
> src/plugins/grass
> To: qgis-commit at lists.qgis.org
>
>
> Author: ersts
> Date: 2007-11-16 15:02:31 +0000 (Fri, 16 Nov 2007)
> New Revision: 7424
>
> [...]
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.qgis.org
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
>
>
--
====================================
Peter J. Ersts, Project Specialist
American Museum of Natural History
Center for Biodiversity and Conservation
Central Park West at 79th Street
New York, New York 10024
Tel: Home Office (518)-632-4745 or NYC Office (212)-496-3488
Web: http://biodiversityinformatics.amnh.org
Web: http://cbc.amnh.org
Quantum GIS Raster Development Team. Visit http://www.qgis.org
to learn more about QGIS, a free and open source desktop GIS
Open Source,
...evolving through community cooperation to change the world bit by bit
More information about the Qgis-developer
mailing list