Code Monkey home page Code Monkey logo

jiffle's People

Contributors

mbedward avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

jiffle's Issues

Define common coordinate system for processing area

Original author: [email protected] (April 03, 2011 01:40:47)

Until now, Jiffle has used the bounds of the first destination image to define the processing area. Defining the processing area separately from image areas instead will make it possible to deal with multiple destination images with differing bounds, and to allow scripts to be written in terms of non-image coordinates such as geographic or proportional.

Source and destination image areas will relate to the processing area via AffineTransforms, with the identity transform being the default.

This issue supersedes issue 1.

Original issue: http://code.google.com/p/jiffle/issues/detail?id=17

Only submit runtime objects to JiffleExecutor

Original author: [email protected] (April 04, 2011 08:52:07)

As per discussion with Andrea on IRC, have a single submit method for JiffleExecutor which takes a runtime object and a progress listener. It is up to the client to set the source and destination images, plus transforms if required, prior to submitting the runtime object. This makes the API simpler and less error-prone.

As a map of images is no longer being passed to the executor, add a getImages method to the runtime class to allow JiffleExecutorTaskResult to retrieve the images as before.

Original issue: http://code.google.com/p/jiffle/issues/detail?id=18

Add rep function

Original author: [email protected] (April 07, 2011 01:23:43)

This is related to the seq function and is another idea lifted from the R language.

rep(42, 3) gives 42, 42, 42

rep(1:3, 3) or rep(1:3, times=3) gives 1,2,3,1,2,3,1,2,3

rep(1:3, each=3) gives 1,1,1,2,2,2,3,3,3

Note that the R syntax uses named arguments. Not sure whether this should be introduced into Jiffle. There isn't much call for it with the existing functions but it does make for concise and readable code.

Original issue: http://code.google.com/p/jiffle/issues/detail?id=22

Remove need for the image parameters map

Original author: [email protected] (March 24, 2011 04:08:56)

Presently, Jiffle requires a Map<String, Jiffle.ImageRole> (the image parameters map) to tell the compiler which variable names to treat as source or destination images. This is a pain for the user, especially when we force them to provide a second map of types <String, RenderedImage> if working with a JiffleRuntime object directly.

Two options to remove the need for the image parameters map are:

  1. Have the compiler infer source and destination image variables from the script. This is actually what Jiffle used to do in its early days, following the approach taken by r.mapcalc.
  2. Require source and destination image variables to be declared in the script itself.

My feeling is that option 2 is preferable because it essentially documents the variables for anyone reading the script and is less likely to break as Jiffle develops. Although option 1 could be re-implemented at the moment, I'm wary of forcing yet another change on users later on if the language develops in such a way that unambiguous inference because too hard for the compiler.

No idea what syntax would be best. On the mailing list I posted this suggestion:

init {
SrcImage src;
DestImage dest;
foo = 42; // un-typed var is treated as an image-scope scalar
}

dest = src + foo;

But I don't like it much :)

Original issue: http://code.google.com/p/jiffle/issues/detail?id=4

Jiffle runtime for OpImage use

Original author: [email protected] (March 23, 2011 11:04:41)

(Was jai-tools issue 76)

Add new grammar, interface and abstract base class to generate runtime class source and objects for use in an OpImage.

The main difference is that instead of writing results of script evaluation to images directly, we return results to the controlling class.


Comment by project member michael.bedward, Jan 24, 2011
Interfaces now:
JiffleRuntime: presently just a marker interface
- JiffleDirectRuntime: provides void evaluate(x, y) and evaluateAll)
- JiffleIndirectRuntime: provides double evaluate(x, y)

Base classes now:
AbstractDirectRuntime
AbstractIndirectRuntime

Added EvaluationModel enum to Jiffle class with constants: DIRECT, INDIRECT

Removed all caching of source code and runtime info from Jiffle class for the moment.

Jiffle now has the following methods:

public JiffleDirectRuntime getRuntimeInstance()
Returns object suitable for direct evaluation (the default), ie. the runtime class implements JiffleDirectRuntime and extends AbstractDirectRuntime

public JiffleRuntime getRuntimeInstance( EvaluationModel type )
Returns an object for either direct or indirect evaluation according to the type arg.

public <T extends JiffleRuntime> T getRuntimeInstance( Class<? extends JiffleRuntime> baseClass )
Infers the evaluation model from the user-supplied base class and returns an object with class extending this base class.

Initial code and unit tests committed to trunk (r1316)


Comment by project member michael.bedward, Feb 28, 2011
Further work on this will be after the 1.10 release.


Comment by project member michael.bedward, Mar 15, 2011
I don't think it's possible to use AreaOpImage as the base for a JiffleOpImage because there's no way of predicting the buffer size since it can be a function of runtime values. So I guess it should be based on SourcelessOpImage. Will do some experiments along that line this week.

Original issue: http://code.google.com/p/jiffle/issues/detail?id=2

Allow Jiffle runtime objects to be passed to Jiffle executor

Original author: [email protected] (April 01, 2011 01:02:58)

Currently, JiffleExecutor accepts a Jiffle object via this method:

public int submit(Jiffle jiffle, 
        Map&lt;String, RenderedImage&gt; images,
        JiffleProgressListener progressListener)

Add another version to accept a JiffleDirectRuntime object:

public int submit(JiffleDirectRuntime runtime, 
        Map&lt;String, RenderedImage&gt; images,
        JiffleProgressListener progressListener)

This reduces overhead when repeatedly running the same script with different images.

Original issue: http://code.google.com/p/jiffle/issues/detail?id=12

Port Jiffle compiler to ANTLR version 4

ANTLR v4 allows for a cleaner separation between grammar files and Java sources.

With previous versions of Jiffle based on ANTLR v3, many compilation tasks required Java code embedded within grammars which was convoluted and brittle. Multiple grammar files were required to follow the v3 idiom of progressive modification of an AST.

ANTLR v4 encourages a single, language-neutral grammar. Jiffle scripts will be compiled to parse trees which are then walked using ordinary Java classes. This should make the compiler sources much easier to understand, maintain and extend.

Allow for Y-Axis direction in CoordinateTransform

Original author: [email protected] (April 11, 2011 13:48:07)

Current CoordinateTransform code doesn't take into account Y-axis direction. For example, when passing geo-spatial bounds to CoordinateTransforms.getTransform method, the transform is calculated as if the image Y coordinates and geo Y coordinates run in the same direction.

One work around with version 0.1.0 is to construct an AffineTransform manually and pass this to the AffineCoordinateTransform constructor.

Original issue: http://code.google.com/p/jiffle/issues/detail?id=23

Optionally associate an AffineTransform with a source image

Original author: [email protected] (March 23, 2011 11:02:04)

(Was Issue 21 in jai-tools list)

Jiffle assumes that the processing area bounds applies to all source and destination images (although we now have the 'outside' option to set a global value for out-of-bounds source pixels).

Associating an AffineTransform with a source image would allow users to deal with non-overlapping image bounds. It could also be used to work with images of different (client-defined) resolutions.

Original issue: http://code.google.com/p/jiffle/issues/detail?id=1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.