Hi,
I want to run the example series which put in the readme part of github. But I have a big problem that all [var image = daikon.Series.parseImage(new DataView(buffer));] image value is null.
How can I solve this issue? Please guide me more.
Thanks.
The codes are here ::
`const http = require('http');
const fs = require('fs');
const daikon = require('daikon');
var series = new daikon.Series();
var files = fs.readdirSync('./data/volume/');
console.log(files);
for (var ctr in files) {
var name = './data/volume/' + files[ctr];
var buf = fs.readFileSync(name);
var buffer = new ArrayBuffer(buf);
console.log(buffer)
var image = daikon.Series.parseImage(new DataView(buffer));
console.log(image)
if (image === null) {
console.error(daikon.Series.parserError);
} else if (image.hasPixelData()) {
// if it's part of the same series, add it
if ((series.images.length === 0) ||
(image.getSeriesId() === series.images[0].getSeriesId())) {
series.addImage(image);
}
}
}
series.buildSeries();
console.log("Number of images read is " + series.images.length);
console.log("Each slice is " + series.images[0].getCols() + " x " + series.images[0].getRows());
console.log("Each voxel is " + series.images[0].getBitsAllocated() + " bits, " +
(series.images[0].littleEndian ? "little" : "big") + " endian");
series.concatenateImageData(null, function (imageData) {
console.log("Total image data size is " + imageData.byteLength + " bytes");
});
const port = process.env.PORT || 3000;
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.end('Hello Node!\n');
});
server.listen(port, () => {
console.log(`Server running on http://localhost:${port}/`);
});
`
After run the .js file :: npm start
I have got these error:
`behnaz@behnaz-Lenovo:~/Desktop/behnaz/nodejs-hello-world-master$ npm start
> nodejs-hello-world@1.0.0 start /home/behnaz/Desktop/behnaz/nodejs-hello-world-master
> node index.js
[
'brain_001.dcm', 'brain_002.dcm',
'brain_003.dcm', 'brain_004.dcm',
'brain_005.dcm', 'brain_006.dcm',
'brain_007.dcm', 'brain_008.dcm',
'brain_009.dcm', 'brain_010.dcm',
'brain_011.dcm', 'brain_012.dcm',
'brain_013.dcm', 'brain_014.dcm',
'brain_015.dcm', 'brain_016.dcm',
'brain_017.dcm', 'brain_018.dcm',
'brain_019.dcm', 'brain_020.dcm'
]
ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 }
null
RangeError: Offset is outside the bounds of the DataView
at DataView.getUint8 (<anonymous>)
at Function.daikon.Parser.isMagicCookieFound (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:83:18)
at daikon.Parser.findFirstTagOffset (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:381:23)
at daikon.Parser.parse (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:104:23)
at Function.daikon.Series.parseImage (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/series.js:68:20)
at Object.<anonymous> (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/index.js:17:31)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 }
null
RangeError: Offset is outside the bounds of the DataView
at DataView.getUint8 (<anonymous>)
at Function.daikon.Parser.isMagicCookieFound (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:83:18)
at daikon.Parser.findFirstTagOffset (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:381:23)
at daikon.Parser.parse (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:104:23)
at Function.daikon.Series.parseImage (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/series.js:68:20)
at Object.<anonymous> (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/index.js:17:31)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 }
null
RangeError: Offset is outside the bounds of the DataView
at DataView.getUint8 (<anonymous>)
at Function.daikon.Parser.isMagicCookieFound (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:83:18)
at daikon.Parser.findFirstTagOffset (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:381:23)
at daikon.Parser.parse (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:104:23)
at Function.daikon.Series.parseImage (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/series.js:68:20)
at Object.<anonymous> (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/index.js:17:31)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 }
null
RangeError: Offset is outside the bounds of the DataView
at DataView.getUint8 (<anonymous>)
at Function.daikon.Parser.isMagicCookieFound (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:83:18)
at daikon.Parser.findFirstTagOffset (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:381:23)
at daikon.Parser.parse (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:104:23)
at Function.daikon.Series.parseImage (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/series.js:68:20)
at Object.<anonymous> (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/index.js:17:31)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 }
null
RangeError: Offset is outside the bounds of the DataView
at DataView.getUint8 (<anonymous>)
at Function.daikon.Parser.isMagicCookieFound (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:83:18)
at daikon.Parser.findFirstTagOffset (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:381:23)
at daikon.Parser.parse (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:104:23)
at Function.daikon.Series.parseImage (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/series.js:68:20)
at Object.<anonymous> (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/index.js:17:31)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 }
null
RangeError: Offset is outside the bounds of the DataView
at DataView.getUint8 (<anonymous>)
at Function.daikon.Parser.isMagicCookieFound (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:83:18)
at daikon.Parser.findFirstTagOffset (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:381:23)
at daikon.Parser.parse (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:104:23)
at Function.daikon.Series.parseImage (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/series.js:68:20)
at Object.<anonymous> (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/index.js:17:31)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 }
null
RangeError: Offset is outside the bounds of the DataView
at DataView.getUint8 (<anonymous>)
at Function.daikon.Parser.isMagicCookieFound (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:83:18)
at daikon.Parser.findFirstTagOffset (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:381:23)
at daikon.Parser.parse (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:104:23)
at Function.daikon.Series.parseImage (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/series.js:68:20)
at Object.<anonymous> (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/index.js:17:31)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 }
null
RangeError: Offset is outside the bounds of the DataView
at DataView.getUint8 (<anonymous>)
at Function.daikon.Parser.isMagicCookieFound (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:83:18)
at daikon.Parser.findFirstTagOffset (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:381:23)
at daikon.Parser.parse (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:104:23)
at Function.daikon.Series.parseImage (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/series.js:68:20)
at Object.<anonymous> (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/index.js:17:31)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 }
null
RangeError: Offset is outside the bounds of the DataView
at DataView.getUint8 (<anonymous>)
at Function.daikon.Parser.isMagicCookieFound (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:83:18)
at daikon.Parser.findFirstTagOffset (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:381:23)
at daikon.Parser.parse (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:104:23)
at Function.daikon.Series.parseImage (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/series.js:68:20)
at Object.<anonymous> (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/index.js:17:31)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 }
null
RangeError: Offset is outside the bounds of the DataView
at DataView.getUint8 (<anonymous>)
at Function.daikon.Parser.isMagicCookieFound (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:83:18)
at daikon.Parser.findFirstTagOffset (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:381:23)
at daikon.Parser.parse (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:104:23)
at Function.daikon.Series.parseImage (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/series.js:68:20)
at Object.<anonymous> (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/index.js:17:31)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 }
null
RangeError: Offset is outside the bounds of the DataView
at DataView.getUint8 (<anonymous>)
at Function.daikon.Parser.isMagicCookieFound (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:83:18)
at daikon.Parser.findFirstTagOffset (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:381:23)
at daikon.Parser.parse (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:104:23)
at Function.daikon.Series.parseImage (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/series.js:68:20)
at Object.<anonymous> (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/index.js:17:31)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 }
null
RangeError: Offset is outside the bounds of the DataView
at DataView.getUint8 (<anonymous>)
at Function.daikon.Parser.isMagicCookieFound (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:83:18)
at daikon.Parser.findFirstTagOffset (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:381:23)
at daikon.Parser.parse (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:104:23)
at Function.daikon.Series.parseImage (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/series.js:68:20)
at Object.<anonymous> (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/index.js:17:31)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 }
null
RangeError: Offset is outside the bounds of the DataView
at DataView.getUint8 (<anonymous>)
at Function.daikon.Parser.isMagicCookieFound (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:83:18)
at daikon.Parser.findFirstTagOffset (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:381:23)
at daikon.Parser.parse (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:104:23)
at Function.daikon.Series.parseImage (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/series.js:68:20)
at Object.<anonymous> (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/index.js:17:31)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 }
null
RangeError: Offset is outside the bounds of the DataView
at DataView.getUint8 (<anonymous>)
at Function.daikon.Parser.isMagicCookieFound (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:83:18)
at daikon.Parser.findFirstTagOffset (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:381:23)
at daikon.Parser.parse (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:104:23)
at Function.daikon.Series.parseImage (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/series.js:68:20)
at Object.<anonymous> (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/index.js:17:31)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 }
null
RangeError: Offset is outside the bounds of the DataView
at DataView.getUint8 (<anonymous>)
at Function.daikon.Parser.isMagicCookieFound (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:83:18)
at daikon.Parser.findFirstTagOffset (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:381:23)
at daikon.Parser.parse (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:104:23)
at Function.daikon.Series.parseImage (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/series.js:68:20)
at Object.<anonymous> (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/index.js:17:31)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 }
null
RangeError: Offset is outside the bounds of the DataView
at DataView.getUint8 (<anonymous>)
at Function.daikon.Parser.isMagicCookieFound (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:83:18)
at daikon.Parser.findFirstTagOffset (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:381:23)
at daikon.Parser.parse (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:104:23)
at Function.daikon.Series.parseImage (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/series.js:68:20)
at Object.<anonymous> (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/index.js:17:31)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 }
null
RangeError: Offset is outside the bounds of the DataView
at DataView.getUint8 (<anonymous>)
at Function.daikon.Parser.isMagicCookieFound (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:83:18)
at daikon.Parser.findFirstTagOffset (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:381:23)
at daikon.Parser.parse (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:104:23)
at Function.daikon.Series.parseImage (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/series.js:68:20)
at Object.<anonymous> (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/index.js:17:31)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 }
null
RangeError: Offset is outside the bounds of the DataView
at DataView.getUint8 (<anonymous>)
at Function.daikon.Parser.isMagicCookieFound (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:83:18)
at daikon.Parser.findFirstTagOffset (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:381:23)
at daikon.Parser.parse (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:104:23)
at Function.daikon.Series.parseImage (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/series.js:68:20)
at Object.<anonymous> (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/index.js:17:31)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 }
null
RangeError: Offset is outside the bounds of the DataView
at DataView.getUint8 (<anonymous>)
at Function.daikon.Parser.isMagicCookieFound (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:83:18)
at daikon.Parser.findFirstTagOffset (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:381:23)
at daikon.Parser.parse (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:104:23)
at Function.daikon.Series.parseImage (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/series.js:68:20)
at Object.<anonymous> (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/index.js:17:31)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 }
null
RangeError: Offset is outside the bounds of the DataView
at DataView.getUint8 (<anonymous>)
at Function.daikon.Parser.isMagicCookieFound (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:83:18)
at daikon.Parser.findFirstTagOffset (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:381:23)
at daikon.Parser.parse (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/parser.js:104:23)
at Function.daikon.Series.parseImage (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/series.js:68:20)
at Object.<anonymous> (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/index.js:17:31)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/series.js:372
this.isMosaic = this.images[0].isMosaic();
^
TypeError: Cannot read property 'isMosaic' of undefined
at daikon.Series.buildSeries (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/node_modules/daikon/src/series.js:372:36)
at Object.<anonymous> (/home/behnaz/Desktop/behnaz/nodejs-hello-world-master/index.js:31:8)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nodejs-hello-world@1.0.0 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodejs-hello-world@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/behnaz/.npm/_logs/2020-04-27T15_03_02_713Z-debug.log
`
Unable to replicate without a concrete example. If you still want help, create a Github repository with your sample code and DICOM. You can get public DICOM that are from the same series from dcm_qa.
Hi, I want to run the example series which put in the readme part of github. But I have a big problem that all [var image = daikon.Series.parseImage(new DataView(buffer));] image value is null. How can I solve this issue? Please guide me more. Thanks.
The codes are here ::
After run the .js file :: npm start I have got these error: