menpo / landmarker.io

Image and mesh annotation web application
https://www.landmarker.io
BSD 3-Clause "New" or "Revised" License
114 stars 21 forks source link

cycle keyword didn't seem to work in template #107

Open jabooth opened 8 years ago

jabooth commented 8 years ago

For some reason I couldn't get the cycle keyword to work as specified here: https://github.com/menpo/landmarker.io/wiki/Templates-specification

I ended up performing the substitution suggested, e.g.:

- 0:4
- 4 1

did we have a test for this @lirsacc? Sorry this is a brief issue, just cropped up and wanted to record it!

here's the file I was attempting:

groups:
-   label: n_prn
    points: 2
    connectivity: 0:1
-   label: acR_sbalR_sn_sbalL_acL
    points: 5
    connectivity: 0:4
-   label: eyeL_en_pi_ex_ps
    points: 4
    connectivity: cycle
-   label: eyeR_en_pi_ex_ps
    points: 4
    connectivity: cycle
-   label: ls_cphL_chL_li_chR_cphR
    points: 6
    connectivity: cycle
-   label: stoU_stoL
    points: 2
-   label: sl_gn
    points: 2
    connectivity: 0:1
-   label: earL_t_sa_xx_sba
    points: 4
    connectivity: cycle
-   label: earR_t_sa_xx_sba
    points: 4
    connectivity: cycle
lirsacc commented 8 years ago

Hey, just tested this it doesn't seem to be related to the cycle keyword but rather the use of connectivity: 0:1 which is supposed to be:

connectivity:
- 0:1

I realise it is verbose (though closer to the actual semantics of a list of connections) so for simplicity, I have added support in https://github.com/menpo/landmarker.io/commit/e0c2e4a2fd4d2310ff34041ff0b190f9c6e3d79d. It handles this case and a comma separated list (prefer yaml list though).

Still need a unit test and port to the server but otherwise merge ready.

EDIT: Confirmed again on current master, http://pastebin.com/RYCyYXiS (original) doesn't work, http://pastebin.com/NctvBmit doesn't work either (however you seem to imply it worked in your case ?) and http://pastebin.com/FvqxGj5L and http://pastebin.com/tPhRe6rY work. After the fix, http://pastebin.com/RYCyYXiS (original) works.