ami-cjs.js
Version:
<p align="center"> <img src="https://cloud.githubusercontent.com/assets/214063/23213764/78ade038-f90c-11e6-8208-4fcade5f3832.png" width="60%"> </p>
135 lines (119 loc) • 3.79 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* @module parsers/volume
*/
var ParsersVolume = function () {
function ParsersVolume() {
_classCallCheck(this, ParsersVolume);
this._rightHanded = true;
}
_createClass(ParsersVolume, [{
key: 'pixelRepresentation',
value: function pixelRepresentation() {
return 0;
}
}, {
key: 'modality',
value: function modality() {
return 'unknown';
}
}, {
key: 'segmentationType',
value: function segmentationType() {
return 'unknown';
}
}, {
key: 'segmentationSegments',
value: function segmentationSegments() {
return [];
}
}, {
key: 'referencedSegmentNumber',
value: function referencedSegmentNumber(frameIndex) {
return -1;
}
}, {
key: 'rightHanded',
value: function rightHanded() {
return this._rightHanded;
}
}, {
key: 'spacingBetweenSlices',
value: function spacingBetweenSlices() {
return null;
}
}, {
key: 'numberOfChannels',
value: function numberOfChannels() {
return 1;
}
}, {
key: 'sliceThickness',
value: function sliceThickness() {
return null;
}
}, {
key: 'dimensionIndexValues',
value: function dimensionIndexValues() {
var frameIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
return null;
}
}, {
key: 'instanceNumber',
value: function instanceNumber() {
var frameIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
return frameIndex;
}
}, {
key: 'windowCenter',
value: function windowCenter() {
var frameIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
return null;
}
}, {
key: 'windowWidth',
value: function windowWidth() {
var frameIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
return null;
}
}, {
key: 'rescaleSlope',
value: function rescaleSlope() {
var frameIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
return 1;
}
}, {
key: 'rescaleIntercept',
value: function rescaleIntercept() {
var frameIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
return 0;
}
}, {
key: '_decompressUncompressed',
value: function _decompressUncompressed() {}
// http://stackoverflow.com/questions/5320439/how-do-i-swap-endian-ness-byte-order-of-a-variable-in-javascript
}, {
key: '_swap16',
value: function _swap16(val) {
return (val & 0xFF) << 8 | val >> 8 & 0xFF;
}
}, {
key: '_swap32',
value: function _swap32(val) {
return (val & 0xFF) << 24 | (val & 0xFF00) << 8 | val >> 8 & 0xFF00 | val >> 24 & 0xFF;
}
}, {
key: 'invert',
value: function invert() {
return false;
}
}]);
return ParsersVolume;
}();
exports.default = ParsersVolume;
module.exports = exports['default'];