dcmnorm 0.16.0 → 0.17.0

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.
Files changed (4) hide show
  1. package/README.md +19 -6
  2. package/index.d.ts +69 -8
  3. package/index.js +56 -56
  4. package/package.json +6 -6
package/README.md CHANGED
@@ -207,7 +207,11 @@ in [the CLI docs](../../docs/cli.md#register-two-volumes).
207
207
  - `metric` (`'auto'` | `'ncc'` | `'mattes-mi'`)
208
208
  - `fixedModality` / `movingModality`: override the files' Modality
209
209
  - `initialMatrix` (number[16]): a starting moving -> fixed transform
210
- - `initialize` (`'translation'` default | `'centroid'` | `'none'`): used without `initialMatrix`
210
+ - `initialize` (`'translation'` default | `'centroid'` | `'none'` | `'multi'`): used without
211
+ `initialMatrix`, except `'multi'`: several starts (the `initialMatrix` and `starts` given,
212
+ the translation estimate, the body centroids, identity), the best plausible one refined
213
+ - `starts` (number[16][]): extra starting matrices; implies `'multi'`
214
+ - `maxRotationDeg` (default 30; 0 for no limit): a larger rotation is `'poor'`, `plausible: false`
211
215
  - `levelsMm` (default `[8, 4, 2]`)
212
216
  - `maxIterations` (per level, default 40)
213
217
  - `timeLimitMs` (default 30000)
@@ -218,7 +222,14 @@ in [the CLI docs](../../docs/cli.md#register-two-volumes).
218
222
  - Result fields:
219
223
  - `matrix`, `rotationDeg` and `translationMm` (of the matrix), `centerMm`
220
224
  - `metric`, `metricValue`, `initialMetricValue`, `normalizedMetric`, `overlapFraction`
221
- - `quality` (0..1) and `qualityLabel` (`'good'` | `'fair'` | `'poor'`)
225
+ - `quality` (0..1) and `qualityLabel` (`'good'` | `'fair'` | `'poor'`), from `bodyMetric` (the
226
+ metric where both bodies are, so FOV truncation and cropping don't count against it) and
227
+ `bodyOverlapFraction`, lowered when the result isn't a local optimum
228
+ - `rotationAngleDeg`, `plausible`
229
+ - multi-start: `consistent` (another start converged within 3 mm; absent for one start) and
230
+ `starts[]`: `start` (`'matrix'` | `'translation'` | `'centroid'` | `'none'` | `'start-<n>'`),
231
+ `matrix`, `normalizedMetric`, `quality`, `qualityLabel`, `rotationAngleDeg`, `plausible`,
232
+ `agrees`, `refined`
222
233
  - `iterations`, `metricEvaluations`, `levels[]`, `initialization`
223
234
  - `converged`, `stopReason` (`'converged'` | `'max-iterations'` | `'time-limit'`)
224
235
  - `timingMs`, `workingBytes`
@@ -228,10 +239,12 @@ in [the CLI docs](../../docs/cli.md#register-two-volumes).
228
239
  - `new RegistrationCancelToken()`: `.cancel()`, `.cancelled`.
229
240
  - `estimateTranslation(fixed, moving, options?): Promise<TranslationEstimate>`
230
241
  - What it does: the fast translation-only estimate, which also seeds `registerVolumes`.
231
- - `options`: `fixedModality`, `movingModality`, `minOverlapMm` (60), `maxShiftMm`.
232
- - Result: `matrix`, `translationMm`, `confidence` (0..1; below about 0.3, fall back to
233
- capture-on-link), `peakCorrelation`, `secondPeakCorrelation`, `overlapMm`, `profiles`,
234
- `timingMs`.
242
+ - `options`: `fixedModality`, `movingModality`, `minOverlapMm` (60), `maxShiftMm`,
243
+ `minOverlapFraction` (0.4: the smallest overlap is 40% of the shorter scan, 20 to
244
+ `minOverlapMm`; when only `minOverlapMm` is given it is used exactly; 0 turns it off).
245
+ - Result: `matrix`, `translationMm`, `confidence` (0..1, calibrated so wrong answers stay below
246
+ 0.3; below that, fall back to capture-on-link), `peakCorrelation`, `secondPeakCorrelation`,
247
+ `overlapMm`, `profiles`, `channelAgreement`, `xyCorrelation`, `minOverlapMm`, `timingMs`.
235
248
  - `readSpatialRegistration(filePath): Promise<string>`
236
249
  - What it does: a Spatial Registration object (`.66.1`, or the pre/post matrices of a
237
250
  Deformable `.66.3`) as a JSON string.
package/index.d.ts CHANGED
@@ -305,9 +305,10 @@ export interface EditTagsOptions {
305
305
 
306
306
  /**
307
307
  * A fast moving -> fixed translation: the S-I shift from cross-correlating per-height profiles
308
- * (body area; plus lung and bone area for CT-CT, integrated intensity for MR-MR / PT-PT), the
309
- * in-plane shift from body-mask centroids over the matched overlap. Works for any acquisition
310
- * orientation. Tens of milliseconds for a typical CT.
308
+ * (body area; plus lung and bone area for CT-CT, integrated intensity for MR-MR / PT-PT) over
309
+ * the two scans' common in-plane support (so a smaller reconstruction FOV does not skew them),
310
+ * short end overlaps down-weighted; the in-plane shift from a masked correlation of their axial
311
+ * projections over the matched overlap. Works for any acquisition orientation. About 100-300 ms.
311
312
  */
312
313
  export declare function estimateTranslation(fixed: DicomVolumeHandle, moving: DicomVolumeHandle, options?: EstimateTranslationOptions | undefined | null): Promise<unknown>
313
314
 
@@ -316,10 +317,19 @@ export interface EstimateTranslationOptions {
316
317
  fixedModality?: string
317
318
  /** Overrides the moving volume's Modality. */
318
319
  movingModality?: string
319
- /** Smallest S-I overlap of the two scans a z shift may imply, mm (default 60). */
320
+ /**
321
+ * Smallest S-I overlap of the two scans a z shift may imply, mm (default 60, an upper
322
+ * bound under `minOverlapFraction`). Given alone, it is used exactly.
323
+ */
320
324
  minOverlapMm?: number
321
325
  /** Largest |z shift| considered, mm (default: anything with enough overlap). */
322
326
  maxShiftMm?: number
327
+ /**
328
+ * The smallest overlap is `min(minOverlapMm, max(fraction x the shorter scan's S-I extent,
329
+ * 20 mm))`, so short slabs (an 80 mm prostate or head MR) can be matched. Default 0.4 when
330
+ * `minOverlapMm` is not given either; 0 turns it off.
331
+ */
332
+ minOverlapFraction?: number
323
333
  }
324
334
 
325
335
  /**
@@ -694,9 +704,18 @@ export interface RegisterVolumesOptions {
694
704
  initialMatrix?: Array<number>
695
705
  /**
696
706
  * Without `initialMatrix`: 'translation' (default; estimateTranslation, then the mask
697
- * centroids when it is not confident), 'centroid' or 'none'.
707
+ * centroids when it is not confident), 'centroid' or 'none'. 'multi': several starts (the
708
+ * `initialMatrix` and `starts` given, the translation estimate, the mask centroids, identity),
709
+ * the best plausible one refined; see `consistent` and `starts` in the result.
698
710
  */
699
711
  initialize?: string
712
+ /** Extra starting moving -> fixed matrices (16 numbers each); implies `initialize: 'multi'`. */
713
+ starts?: Array<Array<number>>
714
+ /**
715
+ * A result rotated more than this many degrees is labelled 'poor' with `plausible: false`
716
+ * (and loses to any plausible start). Default 30; 0 or a negative number: no limit.
717
+ */
718
+ maxRotationDeg?: number
700
719
  /** Working-grid spacing per pyramid level, coarse to fine, mm (default [8, 4, 2]). */
701
720
  levelsMm?: Array<number>
702
721
  /** Optimizer iterations per level (default 40). */
@@ -745,7 +764,11 @@ export interface RegistrationResult {
745
764
  normalizedMetric: number
746
765
  /** Fraction of the fixed body samples that land inside the moving volume. */
747
766
  overlapFraction: number
748
- /** 0..1 heuristic; show it, and never apply a 'poor' result silently. */
767
+ /**
768
+ * 0..1 from the metric over where both bodies are (so FOV truncation and cropping do not
769
+ * count against it) and whether the result is a local optimum; calibrated on public CT, PT
770
+ * and MR pairs. Show it, and never apply a 'poor' result silently.
771
+ */
749
772
  quality: number
750
773
  /** 'good' (>= 0.7), 'fair' (>= 0.4) or 'poor'. */
751
774
  qualityLabel: string
@@ -760,6 +783,37 @@ export interface RegistrationResult {
760
783
  timingMs: number
761
784
  /** Peak bytes of working images and samples held. */
762
785
  workingBytes: number
786
+ /** The normalized metric over the fixed samples inside the moving body (what `quality` uses). */
787
+ bodyMetric: number
788
+ /** Share of the fixed body samples inside the moving body. */
789
+ bodyOverlapFraction: number
790
+ /** Rotation angle of `matrix`, degrees. */
791
+ rotationAngleDeg: number
792
+ /** False when the rotation is above `maxRotationDeg` (the label is then 'poor'). */
793
+ plausible: boolean
794
+ /**
795
+ * Multi-start only: whether another start converged to the same result (within 3 mm,
796
+ * mean over the fixed body's central box). Absent (undefined) for a single start.
797
+ */
798
+ consistent?: boolean
799
+ /** Multi-start only: every start, the returned one first. */
800
+ starts: Array<RegistrationStart>
801
+ }
802
+
803
+ export interface RegistrationStart {
804
+ /** 'matrix', 'translation', 'centroid', 'none' or 'start-<n>' (`starts[n-1]`). */
805
+ start: string
806
+ /** Where this start converged (moving -> fixed, row-major). */
807
+ matrix: Array<number>
808
+ normalizedMetric: number
809
+ quality: number
810
+ qualityLabel: string
811
+ rotationAngleDeg: number
812
+ plausible: boolean
813
+ /** Within 3 mm of the returned result. */
814
+ agrees: boolean
815
+ /** Whether it ran the finest pyramid level (the others stop one level coarser). */
816
+ refined: boolean
763
817
  }
764
818
 
765
819
  export interface RenderedFrame {
@@ -1010,8 +1064,9 @@ export interface TranslationEstimate {
1010
1064
  matrix: Array<number>
1011
1065
  translationMm: Array<number>
1012
1066
  /**
1013
- * 0..1: the correlation peak's height and its margin over the next peak 20+ mm away.
1014
- * Below ~0.3, fall back to capture-on-link.
1067
+ * 0..1, calibrated on public CT, PT and MR pairs so a wrong answer stays below 0.3: the z
1068
+ * peak (overlap-weighted), its margin over the next peak 20+ mm away, the profile channels'
1069
+ * agreement and the in-plane correlation. Below 0.3, fall back to capture-on-link.
1015
1070
  */
1016
1071
  confidence: number
1017
1072
  peakCorrelation: number
@@ -1020,6 +1075,12 @@ export interface TranslationEstimate {
1020
1075
  /** The profiles correlated: 'body', 'lung', 'bone' (CT-CT), 'intensity' (MR-MR, PT-PT). */
1021
1076
  profiles: Array<string>
1022
1077
  timingMs: number
1078
+ /** Share (0..1, weighted) of the profile channels whose own best z is within 10 mm of the answer. */
1079
+ channelAgreement: number
1080
+ /** Correlation of the two scans' axial projections at the x/y answer. */
1081
+ xyCorrelation: number
1082
+ /** The smallest overlap that was allowed, mm. */
1083
+ minOverlapMm: number
1023
1084
  }
1024
1085
 
1025
1086
  /** The dictionary VR of a tag, or null. */
package/index.js CHANGED
@@ -94,8 +94,8 @@ function requireNative() {
94
94
  try {
95
95
  const binding = require('@dcmnorm/android-arm64')
96
96
  const bindingPackageVersion = require('@dcmnorm/android-arm64/package.json').version
97
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
98
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
97
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
98
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
99
99
  }
100
100
  return binding
101
101
  } catch (e) {
@@ -110,8 +110,8 @@ function requireNative() {
110
110
  try {
111
111
  const binding = require('@dcmnorm/android-arm-eabi')
112
112
  const bindingPackageVersion = require('@dcmnorm/android-arm-eabi/package.json').version
113
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
114
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
113
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
114
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
115
115
  }
116
116
  return binding
117
117
  } catch (e) {
@@ -131,8 +131,8 @@ function requireNative() {
131
131
  try {
132
132
  const binding = require('@dcmnorm/win32-x64-gnu')
133
133
  const bindingPackageVersion = require('@dcmnorm/win32-x64-gnu/package.json').version
134
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
135
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
134
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
135
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
136
136
  }
137
137
  return binding
138
138
  } catch (e) {
@@ -147,8 +147,8 @@ function requireNative() {
147
147
  try {
148
148
  const binding = require('@dcmnorm/win32-x64-msvc')
149
149
  const bindingPackageVersion = require('@dcmnorm/win32-x64-msvc/package.json').version
150
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
151
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
150
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
151
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
152
152
  }
153
153
  return binding
154
154
  } catch (e) {
@@ -164,8 +164,8 @@ function requireNative() {
164
164
  try {
165
165
  const binding = require('@dcmnorm/win32-ia32-msvc')
166
166
  const bindingPackageVersion = require('@dcmnorm/win32-ia32-msvc/package.json').version
167
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
168
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
167
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
168
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
169
169
  }
170
170
  return binding
171
171
  } catch (e) {
@@ -180,8 +180,8 @@ function requireNative() {
180
180
  try {
181
181
  const binding = require('@dcmnorm/win32-arm64-msvc')
182
182
  const bindingPackageVersion = require('@dcmnorm/win32-arm64-msvc/package.json').version
183
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
184
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
183
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
184
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
185
185
  }
186
186
  return binding
187
187
  } catch (e) {
@@ -199,8 +199,8 @@ function requireNative() {
199
199
  try {
200
200
  const binding = require('@dcmnorm/darwin-universal')
201
201
  const bindingPackageVersion = require('@dcmnorm/darwin-universal/package.json').version
202
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
203
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
202
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
203
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
204
204
  }
205
205
  return binding
206
206
  } catch (e) {
@@ -215,8 +215,8 @@ function requireNative() {
215
215
  try {
216
216
  const binding = require('@dcmnorm/darwin-x64')
217
217
  const bindingPackageVersion = require('@dcmnorm/darwin-x64/package.json').version
218
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
219
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
218
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
219
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
220
220
  }
221
221
  return binding
222
222
  } catch (e) {
@@ -231,8 +231,8 @@ function requireNative() {
231
231
  try {
232
232
  const binding = require('@dcmnorm/darwin-arm64')
233
233
  const bindingPackageVersion = require('@dcmnorm/darwin-arm64/package.json').version
234
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
235
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
234
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
235
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
236
236
  }
237
237
  return binding
238
238
  } catch (e) {
@@ -251,8 +251,8 @@ function requireNative() {
251
251
  try {
252
252
  const binding = require('@dcmnorm/freebsd-x64')
253
253
  const bindingPackageVersion = require('@dcmnorm/freebsd-x64/package.json').version
254
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
255
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
254
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
255
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
256
256
  }
257
257
  return binding
258
258
  } catch (e) {
@@ -267,8 +267,8 @@ function requireNative() {
267
267
  try {
268
268
  const binding = require('@dcmnorm/freebsd-arm64')
269
269
  const bindingPackageVersion = require('@dcmnorm/freebsd-arm64/package.json').version
270
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
271
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
270
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
271
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
272
272
  }
273
273
  return binding
274
274
  } catch (e) {
@@ -283,8 +283,8 @@ function requireNative() {
283
283
  try {
284
284
  const binding = require('@dcmnorm/freebsd-ppc64')
285
285
  const bindingPackageVersion = require('@dcmnorm/freebsd-ppc64/package.json').version
286
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
287
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
286
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
287
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
288
288
  }
289
289
  return binding
290
290
  } catch (e) {
@@ -304,8 +304,8 @@ function requireNative() {
304
304
  try {
305
305
  const binding = require('@dcmnorm/linux-x64-musl')
306
306
  const bindingPackageVersion = require('@dcmnorm/linux-x64-musl/package.json').version
307
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
308
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
307
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
308
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
309
309
  }
310
310
  return binding
311
311
  } catch (e) {
@@ -320,8 +320,8 @@ function requireNative() {
320
320
  try {
321
321
  const binding = require('@dcmnorm/linux-x64-gnu')
322
322
  const bindingPackageVersion = require('@dcmnorm/linux-x64-gnu/package.json').version
323
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
324
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
323
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
324
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
325
325
  }
326
326
  return binding
327
327
  } catch (e) {
@@ -338,8 +338,8 @@ function requireNative() {
338
338
  try {
339
339
  const binding = require('@dcmnorm/linux-arm64-musl')
340
340
  const bindingPackageVersion = require('@dcmnorm/linux-arm64-musl/package.json').version
341
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
342
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
341
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
342
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
343
343
  }
344
344
  return binding
345
345
  } catch (e) {
@@ -354,8 +354,8 @@ function requireNative() {
354
354
  try {
355
355
  const binding = require('@dcmnorm/linux-arm64-gnu')
356
356
  const bindingPackageVersion = require('@dcmnorm/linux-arm64-gnu/package.json').version
357
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
358
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
357
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
358
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
359
359
  }
360
360
  return binding
361
361
  } catch (e) {
@@ -372,8 +372,8 @@ function requireNative() {
372
372
  try {
373
373
  const binding = require('@dcmnorm/linux-arm-musleabihf')
374
374
  const bindingPackageVersion = require('@dcmnorm/linux-arm-musleabihf/package.json').version
375
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
376
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
375
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
376
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
377
377
  }
378
378
  return binding
379
379
  } catch (e) {
@@ -388,8 +388,8 @@ function requireNative() {
388
388
  try {
389
389
  const binding = require('@dcmnorm/linux-arm-gnueabihf')
390
390
  const bindingPackageVersion = require('@dcmnorm/linux-arm-gnueabihf/package.json').version
391
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
392
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
391
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
392
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
393
393
  }
394
394
  return binding
395
395
  } catch (e) {
@@ -406,8 +406,8 @@ function requireNative() {
406
406
  try {
407
407
  const binding = require('@dcmnorm/linux-loong64-musl')
408
408
  const bindingPackageVersion = require('@dcmnorm/linux-loong64-musl/package.json').version
409
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
410
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
409
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
410
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
411
411
  }
412
412
  return binding
413
413
  } catch (e) {
@@ -422,8 +422,8 @@ function requireNative() {
422
422
  try {
423
423
  const binding = require('@dcmnorm/linux-loong64-gnu')
424
424
  const bindingPackageVersion = require('@dcmnorm/linux-loong64-gnu/package.json').version
425
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
426
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
425
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
426
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
427
427
  }
428
428
  return binding
429
429
  } catch (e) {
@@ -440,8 +440,8 @@ function requireNative() {
440
440
  try {
441
441
  const binding = require('@dcmnorm/linux-riscv64-musl')
442
442
  const bindingPackageVersion = require('@dcmnorm/linux-riscv64-musl/package.json').version
443
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
444
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
443
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
444
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
445
445
  }
446
446
  return binding
447
447
  } catch (e) {
@@ -456,8 +456,8 @@ function requireNative() {
456
456
  try {
457
457
  const binding = require('@dcmnorm/linux-riscv64-gnu')
458
458
  const bindingPackageVersion = require('@dcmnorm/linux-riscv64-gnu/package.json').version
459
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
460
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
459
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
460
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
461
461
  }
462
462
  return binding
463
463
  } catch (e) {
@@ -473,8 +473,8 @@ function requireNative() {
473
473
  try {
474
474
  const binding = require('@dcmnorm/linux-ppc64-gnu')
475
475
  const bindingPackageVersion = require('@dcmnorm/linux-ppc64-gnu/package.json').version
476
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
477
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
476
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
477
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
478
478
  }
479
479
  return binding
480
480
  } catch (e) {
@@ -489,8 +489,8 @@ function requireNative() {
489
489
  try {
490
490
  const binding = require('@dcmnorm/linux-s390x-gnu')
491
491
  const bindingPackageVersion = require('@dcmnorm/linux-s390x-gnu/package.json').version
492
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
493
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
492
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
493
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
494
494
  }
495
495
  return binding
496
496
  } catch (e) {
@@ -509,8 +509,8 @@ function requireNative() {
509
509
  try {
510
510
  const binding = require('@dcmnorm/openharmony-arm64')
511
511
  const bindingPackageVersion = require('@dcmnorm/openharmony-arm64/package.json').version
512
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
513
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
512
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
513
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
514
514
  }
515
515
  return binding
516
516
  } catch (e) {
@@ -525,8 +525,8 @@ function requireNative() {
525
525
  try {
526
526
  const binding = require('@dcmnorm/openharmony-x64')
527
527
  const bindingPackageVersion = require('@dcmnorm/openharmony-x64/package.json').version
528
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
529
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
528
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
529
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
530
530
  }
531
531
  return binding
532
532
  } catch (e) {
@@ -541,8 +541,8 @@ function requireNative() {
541
541
  try {
542
542
  const binding = require('@dcmnorm/openharmony-arm')
543
543
  const bindingPackageVersion = require('@dcmnorm/openharmony-arm/package.json').version
544
- if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
545
- throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
544
+ if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
545
+ throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
546
546
  }
547
547
  return binding
548
548
  } catch (e) {
@@ -683,8 +683,8 @@ if (!nativeBinding || forceWasi) {
683
683
  if (!candidateFailed) {
684
684
  if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
685
685
  const bindingPackageVersion = require('@dcmnorm/wasm32-wasi/package.json').version
686
- if (bindingPackageVersion !== '0.16.0') {
687
- throw new Error(`WASI binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
686
+ if (bindingPackageVersion !== '0.17.0') {
687
+ throw new Error(`WASI binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
688
688
  }
689
689
  }
690
690
  wasiBinding = require('@dcmnorm/wasm32-wasi')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dcmnorm",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "Native Node.js bindings for dcmnorm: DICOM read/edit/transcode/render and DIMSE networking in-process (no CLI subprocess)",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Jason Klotzer",
@@ -53,11 +53,11 @@
53
53
  "test": "node test/smoke.js && node test/dataset.js && node test/registration.js"
54
54
  },
55
55
  "optionalDependencies": {
56
- "@dcmnorm/linux-x64-gnu": "0.16.0",
57
- "@dcmnorm/linux-arm64-gnu": "0.16.0",
58
- "@dcmnorm/win32-x64-msvc": "0.16.0",
59
- "@dcmnorm/darwin-arm64": "0.16.0",
60
- "@dcmnorm/darwin-x64": "0.16.0"
56
+ "@dcmnorm/linux-x64-gnu": "0.17.0",
57
+ "@dcmnorm/linux-arm64-gnu": "0.17.0",
58
+ "@dcmnorm/win32-x64-msvc": "0.17.0",
59
+ "@dcmnorm/darwin-arm64": "0.17.0",
60
+ "@dcmnorm/darwin-x64": "0.17.0"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@napi-rs/cli": "^3.7.3"