node-itk
Version:
ITK is an open-source, cross-platform system that provides developers with an extensive suite of software tools for image analysis. Among them, Node-ITK is a node.js wrapper which built on top of ITK, intended to facilitate its use in rapid prototyping, education, and web servies for Medical Image Processing.Its Origins by My master thesis--jolly, a new Framework for Medical Image Processing
30 lines (25 loc) • 731 B
JavaScript
var node_itk = require('node-itk');
var image = new node_itk.NodeImage('rgb',2);
image.Read('rgb',2, './Data/Desert.jpg');
var rgb = image.GetRGBPixel(200,100)
rgb = new node_itk.NodeRGB(255,0,0);
for (var i = 200 - 1; i >= 0; i--) {
for (var j = 100 - 1; j >= 0; j--) {
image.SetRGBPixel(i,j,[0,255,0])
};
};
image.Write('pixel.png','png');
console.log(rgb.GetValue());
var rgb = new node_itk.NodeRGB();
console.log(rgb.GetBlue());
rgb.SetBlue(12);
rgb.SetRed(22);
rgb.SetGreen(22);
console.log(rgb.GetRed());
console.log(rgb.GetBlue());
var x = rgb.GetValue();
rgb.SetValue([7,3,4]);
var x = rgb.GetValue();
console.log(x);
console.log(rgb.GetLuminance());
console.log(rgb.GetScalarValue());