orx-kinect refactoring + new general orx-depth-camera (#257)
This commit is contained in:
24
orx-fx/src/commonMain/kotlin/colormap/ColormapFilter.kt
Normal file
24
orx-fx/src/commonMain/kotlin/colormap/ColormapFilter.kt
Normal file
@@ -0,0 +1,24 @@
|
||||
package org.openrndr.extra.fx.colormap
|
||||
|
||||
import org.openrndr.draw.Filter
|
||||
import org.openrndr.extra.fx.mppFilterShader
|
||||
import org.openrndr.extra.parameters.DoubleParameter
|
||||
|
||||
abstract class ColormapFilter(code: String, name: String) : Filter(mppFilterShader(code, name)) {
|
||||
|
||||
@DoubleParameter(label = "min value", low = 0.0, high = 1.0, order = 0)
|
||||
var minValue: Double by parameters
|
||||
|
||||
@DoubleParameter(label = "max value", low = 0.0, high = 1.0, order = 1)
|
||||
var maxValue: Double by parameters
|
||||
|
||||
@DoubleParameter(label = "curve", low = 0.001, high = 10.0, order = 2)
|
||||
var curve: Double by parameters
|
||||
|
||||
init {
|
||||
minValue = 0.0
|
||||
maxValue = 1.0
|
||||
curve = 1.0
|
||||
}
|
||||
|
||||
}
|
||||
10
orx-fx/src/commonMain/kotlin/colormap/GrayscaleColormap.kt
Normal file
10
orx-fx/src/commonMain/kotlin/colormap/GrayscaleColormap.kt
Normal file
@@ -0,0 +1,10 @@
|
||||
package org.openrndr.extra.fx.colormap
|
||||
|
||||
import org.openrndr.extra.fx.fx_grayscale_colormap
|
||||
import org.openrndr.extra.parameters.Description
|
||||
|
||||
/**
|
||||
* Maps values of the RED color channel to grayscale.
|
||||
*/
|
||||
@Description("grayscale colormap")
|
||||
class GrayscaleColormap : ColormapFilter(fx_grayscale_colormap, "grayscale-colormap")
|
||||
@@ -0,0 +1,13 @@
|
||||
package org.openrndr.extra.fx.colormap
|
||||
|
||||
import org.openrndr.extra.fx.fx_spectral_zucconi_colormap
|
||||
import org.openrndr.extra.parameters.Description
|
||||
|
||||
/**
|
||||
* Maps values of the RED color channel to natural light dispersion spectrum as described
|
||||
* by Alan Zucconi in the
|
||||
* [Improving the Rainbow](https://www.alanzucconi.com/2017/07/15/improving-the-rainbow/)
|
||||
* article.
|
||||
*/
|
||||
@Description("spectral colormap")
|
||||
class SpectralZucconiColormap : ColormapFilter(fx_spectral_zucconi_colormap, "spectral-zucconi-colormap")
|
||||
12
orx-fx/src/commonMain/kotlin/colormap/TurboColormap.kt
Normal file
12
orx-fx/src/commonMain/kotlin/colormap/TurboColormap.kt
Normal file
@@ -0,0 +1,12 @@
|
||||
package org.openrndr.extra.fx.colormap
|
||||
|
||||
import org.openrndr.extra.fx.fx_turbo_colormap
|
||||
import org.openrndr.extra.parameters.Description
|
||||
|
||||
/**
|
||||
* Maps values of the RED color channel to Turbo Colormap according to
|
||||
* [Turbo, An Improved Rainbow Colormap for Visualization](https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html)
|
||||
* by Google.
|
||||
*/
|
||||
@Description("turbo colormap")
|
||||
open class TurboColormap : ColormapFilter(fx_turbo_colormap, "turbo-colormap")
|
||||
Reference in New Issue
Block a user