yujota/elm-makie/1.0.0

Rerouted (cache, verified). The original is gone. This copy comes from a Lamdera package cache made before it went. The Lamdera package server serves a copy recovered from a Lamdera package cache from 2021-02-13.

What we checked: Rebuilt from the unpacked sources in a Lamdera package cache (5 copies agree), which Elm only writes after the published SHA-1 checked out; elm.json is byte-identical to package.elm-lang.org's; the exposed modules match docs.json; the zip is our own, so its SHA-1 is not the published one.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/yujota/elm-makie/zipball/1.0.0/

yujota/elm-makie

An Elm library to annotate images for supervised learning.

Using this library, users are able to zoom, rotate images and also annotate images for supervised learning.

This library originally aimed to provide an option to display and annotate pathology images.

Example application

module Main exposing (main)

import Browser
import Browser.Events exposing (onAnimationFrame)
import Html exposing (Html)
import Makie exposing (Makie)
import Makie.Data as Data exposing (Data)
import Makie.Image as Image exposing (Image)
import Makie.Options as Options
import Makie.Project as Project exposing (Project)
import Time exposing (Posix)


main =
    Browser.element { init = init, update = update, subscriptions = subscriptions, view = view }


data : Data
data =
    let
        initialSeed =
            0

        image =
            Image.image (Image.id "sample") { name = "sample", width = 640, height = 480, url = "someUrl" }

        annotations =
            []
    in
    Data.data initialSeed image annotations


type alias Model =
    Makie Msg


type Msg
    = MakieMsg Makie.Msg
    | OnAnimationFrame Posix


init : () -> ( Model, Cmd Msg )
init _ =
    ( Makie.makie { options = Options.default, project = Project.empty, data = data, lifter = MakieMsg }, Cmd.none )


update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
    case msg of
        MakieMsg makieMsg ->
            Makie.update
                { options = Options.default, project = Project.empty, data = data, lifter = MakieMsg }
                makieMsg
                model
                |> (\( m, _ ) -> ( m, Cmd.none ))

        OnAnimationFrame posix ->
            update (Makie.tick posix |> MakieMsg) model


subscriptions : Model -> Sub Msg
subscriptions _ =
    onAnimationFrame OnAnimationFrame


view : Model -> Html Msg
view model =
    Makie.view MakieMsg model