dcmjs 0.19.3 → 0.19.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -36,7 +36,7 @@ _Parts of DICOM that dcmjs will focus on:_
36
36
 
37
37
  _Parts of DICOM that dcmjs *will not* focus on:_
38
38
 
39
- - DIMSE (legacy networking like C-FIND, C-MOVE, etc). See the [dicom-dimse project](https://github.com/PantelisGeorgiadis/dcmjs-dimse) for that.
39
+ - DIMSE (legacy networking like C-STORE, C-FIND, C-MOVE, etc). See the [dcmjs-dimse project](https://github.com/PantelisGeorgiadis/dcmjs-dimse) for that.
40
40
  - Physical Media (optical disks). See [this FAQ](https://www.dclunie.com/medical-image-faq/html/index.html) if you need to work with those.
41
41
 
42
42
  # Usage
package/build/dcmjs.es.js CHANGED
@@ -2642,6 +2642,13 @@ function () {
2642
2642
  value: function isPixelDataTag() {
2643
2643
  return this.is(0x7fe00010);
2644
2644
  }
2645
+ }, {
2646
+ key: "isPrivateCreator",
2647
+ value: function isPrivateCreator() {
2648
+ var group = this.group();
2649
+ var element = this.element();
2650
+ return group % 2 === 1 && element < 0x100 && element > 0x00;
2651
+ }
2645
2652
  }, {
2646
2653
  key: "write",
2647
2654
  value: function write(stream, vrType, values, syntax, writeOptions) {
@@ -2746,7 +2753,8 @@ var addAccessors = function addAccessors(dest, src) {
2746
2753
  },
2747
2754
  set: function set(v) {
2748
2755
  src[key] = v;
2749
- }
2756
+ },
2757
+ configurable: true
2750
2758
  });
2751
2759
  });
2752
2760
  };
@@ -2910,6 +2918,7 @@ function () {
2910
2918
  var sqZero = naturalDataset[naturalName][0];
2911
2919
 
2912
2920
  if (sqZero && _typeof(sqZero) === "object" && !sqZero.length) {
2921
+ naturalDataset[naturalName] = _toConsumableArray(naturalDataset[naturalName]);
2913
2922
  addAccessors(naturalDataset[naturalName], sqZero);
2914
2923
  } else {
2915
2924
  naturalDataset[naturalName] = sqZero;
@@ -3271,6 +3280,8 @@ function () {
3271
3280
  vrType = "OW";
3272
3281
  } else if (vrType == "xs") {
3273
3282
  vrType = "US";
3283
+ } else if (tag.isPrivateCreator()) {
3284
+ vrType = "LO";
3274
3285
  } else {
3275
3286
  vrType = "UN";
3276
3287
  }
@@ -12317,7 +12328,8 @@ function _createSegFromImages$1(images, isMultiframe, options) {
12317
12328
  * @param {string[]} imageIds - An array of the imageIds.
12318
12329
  * @param {ArrayBuffer} arrayBuffer - The SEG arrayBuffer.
12319
12330
  * @param {*} metadataProvider.
12320
- * @param {number} tolerance - checks tolerance, default value 1.e-3.
12331
+ * @param {bool} skipOverlapping - skip checks for overlapping segs, default value false.
12332
+ * @param {number} tolerance - default value 1.e-3.
12321
12333
  *
12322
12334
  * @return {[]ArrayBuffer}a list of array buffer for each labelMap
12323
12335
  * @return {Object} an object from which the segment metadata can be derived
@@ -13100,6 +13112,10 @@ function generateSegmentation$2(images, labelmaps3DorBrushData) {
13100
13112
  * @param {string[]} imageIds An array of the imageIds.
13101
13113
  * @param {ArrayBuffer} arrayBuffer The SEG arrayBuffer.
13102
13114
  * @param {*} metadataProvider
13115
+ * @param {bool} skipOverlapping - skip checks for overlapping segs, default value false.
13116
+ * @param {number} tolerance - default value 1.e-3.
13117
+ * @param {number} cornerstoneToolsVersion - default value 4.
13118
+ *
13103
13119
  * @returns {Object} The toolState and an object from which the
13104
13120
  * segment metadata can be derived.
13105
13121
  */
@@ -13107,14 +13123,15 @@ function generateSegmentation$2(images, labelmaps3DorBrushData) {
13107
13123
 
13108
13124
  function generateToolState$2(imageIds, arrayBuffer, metadataProvider) {
13109
13125
  var skipOverlapping = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
13110
- var cornerstoneToolsVersion = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 4;
13126
+ var tolerance = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1e-3;
13127
+ var cornerstoneToolsVersion = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 4;
13111
13128
 
13112
13129
  if (cornerstoneToolsVersion === 4) {
13113
- return Segmentation$2.generateToolState(imageIds, arrayBuffer, metadataProvider, skipOverlapping);
13130
+ return Segmentation$2.generateToolState(imageIds, arrayBuffer, metadataProvider, skipOverlapping, tolerance);
13114
13131
  }
13115
13132
 
13116
13133
  if (cornerstoneToolsVersion === 3) {
13117
- return Segmentation$1.generateToolState(imageIds, arrayBuffer, metadataProvider, skipOverlapping);
13134
+ return Segmentation$1.generateToolState(imageIds, arrayBuffer, metadataProvider);
13118
13135
  }
13119
13136
 
13120
13137
  console.warn("No generateToolState adapater for cornerstone version ".concat(cornerstoneToolsVersion, ", exiting."));