mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-13 20:00:05 +01:00
Fix Meta modules and add inputs to ndvi-colormap (#1432)
* fix meta module bug * fix create meta module and add inputs to ndvi-colormap Co-authored-by: Harsh Khandeparkar <34770591+HarshKhandeparkar@users.noreply.github.com> Co-authored-by: Jeffrey Warren <jeff@unterbahn.com>
This commit is contained in:
committed by
Jeffrey Warren
parent
448848b2d1
commit
c453bbbd92
@@ -1,6 +1,24 @@
|
|||||||
{
|
{
|
||||||
"name": "ndvi-colormap",
|
"name": "ndvi-colormap",
|
||||||
"description": "Sequentially Applies NDVI and Colormap steps",
|
"description": "Sequentially Applies NDVI and Colormap steps",
|
||||||
"inputs": {},
|
"inputs": {
|
||||||
|
"filter": {
|
||||||
|
"type": "select",
|
||||||
|
"desc": "Filter color",
|
||||||
|
"default": "red",
|
||||||
|
"values": ["red", "blue"]
|
||||||
|
},
|
||||||
|
"colormap": {
|
||||||
|
"type": "select",
|
||||||
|
"desc": "Name of the Colormap",
|
||||||
|
"default": "default",
|
||||||
|
"values": [
|
||||||
|
"default",
|
||||||
|
"greyscale",
|
||||||
|
"stretched",
|
||||||
|
"fastie"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"docs-link": "https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md#ndvi-colormap-module"
|
"docs-link": "https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md#ndvi-colormap-module"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,11 +16,6 @@ module.exports = function createMetaModule(mapFunction, moduleOptions) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// map inputs to internal step options;
|
|
||||||
// use this to set defaults for internal steps
|
|
||||||
// and to expose internal settings as external meta-module parameters;
|
|
||||||
// it must return a steps object
|
|
||||||
var steps = mapFunction(options);
|
|
||||||
|
|
||||||
/* example:
|
/* example:
|
||||||
function mapFunction(opt, _defaults) {
|
function mapFunction(opt, _defaults) {
|
||||||
@@ -41,6 +36,12 @@ module.exports = function createMetaModule(mapFunction, moduleOptions) {
|
|||||||
|
|
||||||
var step = this;
|
var step = this;
|
||||||
|
|
||||||
|
// map inputs to internal step options;
|
||||||
|
// use this to set defaults for internal steps
|
||||||
|
// and to expose internal settings as external meta-module parameters;
|
||||||
|
// it must return a steps object
|
||||||
|
var steps = mapFunction(options);
|
||||||
|
|
||||||
var internalSequencer = ImageSequencer({ inBrowser: false, ui: false });
|
var internalSequencer = ImageSequencer({ inBrowser: false, ui: false });
|
||||||
internalSequencer.loadImage(input.src, function onAddImage() {
|
internalSequencer.loadImage(input.src, function onAddImage() {
|
||||||
internalSequencer.importJSON(steps);
|
internalSequencer.importJSON(steps);
|
||||||
|
|||||||
Reference in New Issue
Block a user