From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33508 invoked by alias); 21 Jan 2018 03:37:20 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 33486 invoked by uid 89); 21 Jan 2018 03:37:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=H*F:D*be, jars, ecosystem, images X-HELO: maximusconfessor.all2all.org Received: from maximusconfessor.all2all.org (HELO maximusconfessor.all2all.org) (79.99.200.102) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 21 Jan 2018 03:37:14 +0000 Received: from localhost (unknown [192.168.0.2]) by maximusconfessor.all2all.org (Postfix) with ESMTP id DC277A04C10E for ; Sun, 21 Jan 2018 04:37:12 +0100 (CET) Received: from maximusconfessor.all2all.org ([192.168.0.1]) by localhost (maximusconfessor.all2all.org [192.168.0.2]) (amavisd-new, port 10024) with ESMTP id fk0NJ+79bOu5 for ; Sun, 21 Jan 2018 04:37:08 +0100 (CET) Received: from capac (unknown [177.158.33.158]) by maximusconfessor.all2all.org (Postfix) with ESMTPSA id BC6B8A04C0E1 for ; Sun, 21 Jan 2018 04:37:07 +0100 (CET) Date: Sun, 21 Jan 2018 03:37:00 -0000 From: David Pirotte To: kawa Subject: ImagJ/Fiji 'binding' wrong argument type - help welcome Message-ID: <20180121013700.00afafbe@capac> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/fIEi0Jqgc9ILqoKPU9FL3a1"; protocol="application/pgp-signature" X-IsSubscribed: yes X-SW-Source: 2018-q1/txt/msg00016.txt.bz2 --Sig_/fIEi0Jqgc9ILqoKPU9FL3a1 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-length: 2351 Hi again, While expecting some help wrt my previous message, I tried another 'binding= ' using another class of the same plugin [1] This time, though I will later want to avoid it, I wrote 'binding' so it ca= lls the imagej/fiji 'ecosystem', which means calling the procedure "run", defined i= n ij.IJ (which I 'bind' in my ij-core.scm module). This works fine, but then my pro= blem is to get access to the result, see: 1- (import (ij-core)) (export ij-geometry-to-distance-map) (define (ij-geometry-to-distance-map iplus1 #!optional (threshold 128)) (ij-run iplus1 "Geometry to Distance Map" (string-append "threshold=3D" (number->string threshold)))) then export CLASSPATH=3D.:./jars/ij.jar:./jars/local-thickness.jar kawa -C ij-local-thickness.scm and using it david@capac:~/lpdi/projects/kawa 16 $ kawa -Dplugins.dir=3D/usr/lpdi/proj= ects/kawa/jars #|kawa:1|# (import (ij-core) (ij-local-thickness)) #|.....2|# #|kawa:3|# (define iplus1 (ij-open "images/camada-mapa.png")) #|kawa:4|# (ij-geometry-to-distance-map iplus1) #!null #|kawa:5|#=20 perfect, but I don't get the resulted computed image, because "run" doesn't= return anything in their ecosystem with their string based API 2- I add a binding to the getResultImage of that class (define-alias get-result-image-edt sc.fiji.localThickness.EDT_S1D:getResultImage) I use it, and I pass a wrong first argument on purpose, to see what the system expects: (define (ij-geometry-to-distance-map iplus1 #!optional (threshold 128)) (ij-run iplus1 "Geometry to Distance Map" (string-append "threshold=3D" (number->string threshold))) (get-result-image-edt iplus1)) -| ... #|kawa:4|# (ij-geometry-to-distance-map iplus1) Argument #1 (null) to 'sc.fiji.localThickness.EDT_S1D.getResultImage()' has= wrong type (expected: sc.fiji.localThickness.EDT_S1D) So it seems that these methods (including the one in my previous mail), exp= ect as their first argument the instance of the class upon which to run the code .= .. But how do I get access to the instance created by imagej or these plugin classes? Thanks, David [1] https://github.com/fiji/LocalThickness/blob/master/src/main/java/sc/fij= i/localThickness/EDT_S1D.java --Sig_/fIEi0Jqgc9ILqoKPU9FL3a1 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature Content-length: 488 -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEhCJlRZtBM3furJHe83T9k6MFetcFAlpkCtwACgkQ83T9k6MF etdYtAgA0I9+oeigDWUeM3P8fP8knkQxHQEMFv+xBrKIGY9vF+zCaoPKKiUFklEf HoASvnj4ybaaV1NE3rsaPdtBOdkUfh6vVhucHkcJcrxkKPKgIhxIPZ5F0X5c/+fc mI4FXe/x/NDPaF4ikrItyn8DTq6ceMYdT7bRIWadp7FWhzxdFibke2e34fFYMd4w 2+JpTx5qpvjOmPYHNEMShqqBkoJL7aDIGQQ6FRP99i5bxUUfLsrnY9hyOO6w5Mpf C4lGQYkz3e7ur+WG1Lc/edBmthxx2C3khYgC73EybtT7K/ge+BHDEkdPd4YIeQ4o 25utdfJpF2mHNMPQpnOtZ0QR6V3GxQ== =WSwQ -----END PGP SIGNATURE----- --Sig_/fIEi0Jqgc9ILqoKPU9FL3a1--