-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ability to set step options via string command syntax: "invert,threshold:{level:50}" #127
Comments
@tech4GT suggests, and I agree!:
|
@jywarren On the browser side once we implement this maybe we can have a |
See comment here: #203 (comment)
|
So in summary, we should run the URL hash through a new |
Here's the current implementation of image-sequencer/examples/lib/defaultHtmlSequencerUi.js Lines 12 to 23 in 1de72d7
Hope that helps!!! |
@jywarren thanks😀 |
Once we get to this, we'll want to have a number of tests which show how it can be used. For example, let's have a test which begins with just one module, then use a string like The tests can act as a kind of guide for how to use the feature -- and when we add documentation (which could also be part of the PR), we can link people to the corresponding tests to demonstrate how they work in real code. It may be worthwhile to break out the |
@jywarren Got it!! This makes total sense!! |
Should we make a pure-json variant or hold off on this for now? |
@jywarren I think after doing this only one function makes sense |
this function can basically serve as a wrapper around adding multiple steps defined in an array with their options |
but why not `importStepsFromString()`? I'm thinking about if we take the
entire URL hash and pass it to a single function, you know?
…On Sun, Jun 3, 2018 at 10:47 AM, Varun Gupta ***@***.***> wrote:
this function can basically serve as a wrapper around adding multiple
steps defined in an array with their options
This will also complete the architecture we originally decided
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#127 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJznD0iosDHLZ2sZkdEyzeKfksxtPks5t5BMKgaJpZM4Pqk6F>
.
|
@jywarren I don't understand, do we want to stringify JSON? |
I mean the current ImportStepsfromString() imports these steps right? |
oh, wait -- let me see. the API has changed a lot in the past week! |
@jywarren I'll list it so we have a sequencer.toString() which takes the currents steps and outputs them as a string, then we have a sequencer.importStepsFromStringtoJson(string) which takes a stringified sequence and returns the steps as json. |
Oh, wait - no that's ok, no need for |
Yikes sorry too many function names flying around. Edited the above to mean |
@jywarren that is a great idea!! |
@jywarren I got this!! Don't worry I have a pretty good idea of what we need now |
I 'll do some refactoring and then post all the final function names and what they do here |
OK! One thing that may help is to move all of the import/export functions into a separate source file called |
@jywarren Good idea!! I'll do that too!! |
But isn't it very late there? No need to do this now, just thinking about next steps!!! |
working on this now!! |
@jywarren No problem this will only take a couple of minutes |
This is done now closing!! |
Did we want to break out any follow up steps like a pure json style string
type? Or anything else?
Esp not including settings if they match the defaults? Or do we have one
open for that already?
Great!!!!!
…On Fri, Jun 8, 2018, 2:04 PM Varun Gupta ***@***.***> wrote:
This is done now closing!!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#127 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ3r5uwHg1kI8bAOpRX_cKx_CKq60ks5t6rx7gaJpZM4Pqk6F>
.
|
@jywarren we have it already!!😁 |
The ability to record both
steps
andsettings
in a string could be useful for browser work, for saving sequences inlocalStorage
, in a key/value database on server or client side, and for REST based processing, so I think it's worth considering for all those reasons.Building on #91, the URL format:
/examples/#steps=green-channel,crop
Could have additional options set with:
/examples/#steps=green-channel,crop[w:50%|h:30%]
Is this an appropriate way to encode steps?
crop[w:50%|h:30%]
or is there an easier or more straightforward way?Update
Considering after #203, using parentheses:
?steps=invert,green-channel,threshold(50)
or for more complex parameters:?steps=ndvi('blue'),lens({x:25,y:15})
OR simpler:
?steps=ndvi('blue'),lens(x:25,y:15)
Or even full JSON, although it's less compact:
?steps={ndvi:'blue'},{lens:{x:25,y:15}}
--we could potentially have a "simple" syntax that's optimized for use in URLs, and a "full" syntax that's actually JSON.
The text was updated successfully, but these errors were encountered: