@cornerstonejs/metadata 5.1.4 → 5.2.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 (98) hide show
  1. package/dist/esm/displayset/BaseDisplaySet.d.ts +2 -2
  2. package/dist/esm/displayset/BaseDisplaySet.js +1 -1
  3. package/dist/esm/displayset/IDisplaySet.d.ts +1 -1
  4. package/dist/esm/displayset/ImageStackDisplaySet.d.ts +2 -2
  5. package/dist/esm/displayset/ImageStackDisplaySet.js +1 -1
  6. package/dist/esm/displayset/buildSeriesInfo.d.ts +1 -1
  7. package/dist/esm/displayset/createDisplaySetFromGroup.d.ts +2 -2
  8. package/dist/esm/displayset/createDisplaySetFromGroup.js +6 -6
  9. package/dist/esm/displayset/defaultDisplaySetSplitRules.d.ts +1 -1
  10. package/dist/esm/displayset/defaultDisplaySetSplitRules.js +4 -4
  11. package/dist/esm/displayset/displaySetProvider.js +3 -3
  12. package/dist/esm/displayset/displayset.test.js +9 -9
  13. package/dist/esm/displayset/groupInstancesBySplitRules.d.ts +1 -1
  14. package/dist/esm/displayset/index.d.ts +22 -22
  15. package/dist/esm/displayset/index.js +15 -15
  16. package/dist/esm/displayset/isEcgInstance.d.ts +1 -1
  17. package/dist/esm/displayset/isImageInstance.d.ts +1 -1
  18. package/dist/esm/displayset/isVideoInstance.d.ts +1 -1
  19. package/dist/esm/displayset/isVideoInstance.js +1 -1
  20. package/dist/esm/displayset/isWsiInstance.d.ts +1 -1
  21. package/dist/esm/displayset/registerDisplaySetMetadata.d.ts +1 -1
  22. package/dist/esm/displayset/registerDisplaySetMetadata.js +2 -2
  23. package/dist/esm/displayset/resolveInstances.d.ts +1 -1
  24. package/dist/esm/displayset/splitImageIdsBySplitRules.d.ts +1 -1
  25. package/dist/esm/displayset/splitImageIdsBySplitRules.js +2 -2
  26. package/dist/esm/displayset/viewportTypes.d.ts +1 -1
  27. package/dist/esm/enums/index.d.ts +3 -3
  28. package/dist/esm/enums/index.js +3 -3
  29. package/dist/esm/index.d.ts +11 -11
  30. package/dist/esm/index.js +8 -8
  31. package/dist/esm/metaData.d.ts +1 -1
  32. package/dist/esm/metaData.js +1 -1
  33. package/dist/esm/package.json +3 -0
  34. package/dist/esm/registerDefaultProviders.js +18 -18
  35. package/dist/esm/types/IImageCalibration.d.ts +1 -1
  36. package/dist/esm/types/MetadataModuleTypes.d.ts +1 -1
  37. package/dist/esm/types/index.d.ts +3 -3
  38. package/dist/esm/utilities/Tags.d.ts +1 -1
  39. package/dist/esm/utilities/Tags.js +2 -2
  40. package/dist/esm/utilities/calibratedPixelSpacingMetadataProvider.d.ts +1 -1
  41. package/dist/esm/utilities/calibratedPixelSpacingMetadataProvider.js +3 -3
  42. package/dist/esm/utilities/dicomStream/MetaDataIterator.js +1 -1
  43. package/dist/esm/utilities/dicomStream/NaturalTagListener.d.ts +1 -1
  44. package/dist/esm/utilities/dicomStream/NaturalTagListener.js +2 -2
  45. package/dist/esm/utilities/dicomStream/index.d.ts +3 -3
  46. package/dist/esm/utilities/dicomStream/index.js +2 -2
  47. package/dist/esm/utilities/getPixelSpacingInformation.d.ts +1 -1
  48. package/dist/esm/utilities/getPixelSpacingInformation.js +2 -2
  49. package/dist/esm/utilities/index.d.ts +16 -16
  50. package/dist/esm/utilities/index.js +16 -16
  51. package/dist/esm/utilities/metadataProvider/addDicomPart10Instance.js +2 -2
  52. package/dist/esm/utilities/metadataProvider/cacheData.js +3 -3
  53. package/dist/esm/utilities/metadataProvider/calibrationModule.js +2 -2
  54. package/dist/esm/utilities/metadataProvider/combineFrameInstance.js +4 -4
  55. package/dist/esm/utilities/metadataProvider/compressedFrameData.js +2 -2
  56. package/dist/esm/utilities/metadataProvider/dataLookup.js +2 -2
  57. package/dist/esm/utilities/metadataProvider/ecgFromInstance.js +2 -2
  58. package/dist/esm/utilities/metadataProvider/ecgModule.d.ts +1 -1
  59. package/dist/esm/utilities/metadataProvider/imageIdsProviders.d.ts +2 -2
  60. package/dist/esm/utilities/metadataProvider/imageIdsProviders.js +3 -3
  61. package/dist/esm/utilities/metadataProvider/imagePlaneCalibrated.d.ts +1 -1
  62. package/dist/esm/utilities/metadataProvider/imagePlaneCalibrated.js +6 -6
  63. package/dist/esm/utilities/metadataProvider/index.d.ts +18 -18
  64. package/dist/esm/utilities/metadataProvider/index.js +17 -17
  65. package/dist/esm/utilities/metadataProvider/instanceFromListener.js +2 -2
  66. package/dist/esm/utilities/metadataProvider/naturalizedHandlers.js +4 -4
  67. package/dist/esm/utilities/metadataProvider/pixelDataUpdate.js +3 -3
  68. package/dist/esm/utilities/metadataProvider/scalingFromInstance.js +2 -2
  69. package/dist/esm/utilities/metadataProvider/tagModules.d.ts +1 -1
  70. package/dist/esm/utilities/metadataProvider/tagModules.js +5 -5
  71. package/dist/esm/utilities/metadataProvider/transferSyntaxProvider.js +3 -3
  72. package/dist/esm/utilities/metadataProvider/uriModule.js +2 -2
  73. package/dist/esm/utilities/modules/cine.d.ts +1 -1
  74. package/dist/esm/utilities/modules/clinicalTrial.d.ts +1 -1
  75. package/dist/esm/utilities/modules/ecg.d.ts +1 -1
  76. package/dist/esm/utilities/modules/generalImage.d.ts +1 -1
  77. package/dist/esm/utilities/modules/generalSeries.d.ts +1 -1
  78. package/dist/esm/utilities/modules/generalStudy.d.ts +1 -1
  79. package/dist/esm/utilities/modules/imagePixel.d.ts +1 -1
  80. package/dist/esm/utilities/modules/imagePlane.d.ts +1 -1
  81. package/dist/esm/utilities/modules/index.js +22 -22
  82. package/dist/esm/utilities/modules/modalityLut.d.ts +1 -1
  83. package/dist/esm/utilities/modules/patient.d.ts +1 -1
  84. package/dist/esm/utilities/modules/patientStudy.d.ts +1 -1
  85. package/dist/esm/utilities/modules/ptImage.d.ts +1 -1
  86. package/dist/esm/utilities/modules/ptIsotope.d.ts +1 -1
  87. package/dist/esm/utilities/modules/ptSeries.d.ts +1 -1
  88. package/dist/esm/utilities/modules/radiopharmaceuticalInfo.d.ts +1 -1
  89. package/dist/esm/utilities/modules/sopCommon.d.ts +1 -1
  90. package/dist/esm/utilities/modules/transferSyntax.d.ts +1 -1
  91. package/dist/esm/utilities/modules/ultrasoundEnhancedRegion.d.ts +1 -1
  92. package/dist/esm/utilities/modules/unassigned.d.ts +1 -1
  93. package/dist/esm/utilities/modules/usRegionChild.d.ts +1 -1
  94. package/dist/esm/utilities/modules/voiLut.d.ts +1 -1
  95. package/dist/esm/utilities/splitImageIdsBy4DTags.js +2 -2
  96. package/dist/esm/version.d.ts +1 -1
  97. package/dist/esm/version.js +1 -1
  98. package/package.json +25 -24
@@ -1,16 +1,16 @@
1
- export { getSingleBufferFromArray } from './bulkDataFromArray';
2
- export { toNumber, toFiniteNumber } from './toNumber';
3
- export { default as toNumberDefault } from './toNumber';
4
- export { default as isVideoTransferSyntax, videoUIDs, } from './isVideoTransferSyntax';
5
- export { default as imageIdToURI } from './imageIdToURI';
6
- export { isEqual, isEqualNegative, isEqualAbs, isNumber } from './isEqual';
7
- export { getPixelSpacingInformation, calculateRadiographicPixelSpacing, getERMF, } from './getPixelSpacingInformation';
8
- export { default as calibratedPixelSpacingMetadataProvider } from './calibratedPixelSpacingMetadataProvider';
9
- export * from './getNaturalizedField';
10
- export { default as splitImageIdsBy4DTags, handleMultiframe4D, generateFrameImageId, } from './splitImageIdsBy4DTags';
11
- export * as Tags from './Tags';
12
- export * as DicomStream from './dicomStream';
13
- export * from './logging';
14
- export * from './metadataProvider';
15
- export * as typedMetadataProviders from './metadataProvider';
16
- export * from '../displayset';
1
+ export { getSingleBufferFromArray } from './bulkDataFromArray.js';
2
+ export { toNumber, toFiniteNumber } from './toNumber.js';
3
+ export { default as toNumberDefault } from './toNumber.js';
4
+ export { default as isVideoTransferSyntax, videoUIDs, } from './isVideoTransferSyntax.js';
5
+ export { default as imageIdToURI } from './imageIdToURI.js';
6
+ export { isEqual, isEqualNegative, isEqualAbs, isNumber } from './isEqual.js';
7
+ export { getPixelSpacingInformation, calculateRadiographicPixelSpacing, getERMF, } from './getPixelSpacingInformation.js';
8
+ export { default as calibratedPixelSpacingMetadataProvider } from './calibratedPixelSpacingMetadataProvider.js';
9
+ export * from './getNaturalizedField.js';
10
+ export { default as splitImageIdsBy4DTags, handleMultiframe4D, generateFrameImageId, } from './splitImageIdsBy4DTags.js';
11
+ export * as Tags from './Tags.js';
12
+ export * as DicomStream from './dicomStream/index.js';
13
+ export * from './logging.js';
14
+ export * from './metadataProvider/index.js';
15
+ export * as typedMetadataProviders from './metadataProvider/index.js';
16
+ export * from '../displayset/index.js';
@@ -1,5 +1,5 @@
1
- import { addTyped } from '../../metaData';
2
- import { MetadataModules } from '../../enums';
1
+ import { addTyped } from '../../metaData.js';
2
+ import { MetadataModules } from '../../enums/index.js';
3
3
  export function addDicomWebInstance(imageId, metadata) {
4
4
  return addTyped(MetadataModules.NATURALIZED, imageId, {
5
5
  dicomwebJson: metadata,
@@ -1,6 +1,6 @@
1
- import { getAddModuleType, MetadataModules } from '../../enums';
2
- import { addAddProvider, addTypedProvider, clear, clearQuery, getMetaData, } from '../../metaData';
3
- import { BASE_IMAGE_ID, FRAME_IMAGE_IDS } from './imageIdsProviders';
1
+ import { getAddModuleType, MetadataModules } from '../../enums/index.js';
2
+ import { addAddProvider, addTypedProvider, clear, clearQuery, getMetaData, } from '../../metaData.js';
3
+ import { BASE_IMAGE_ID, FRAME_IMAGE_IDS } from './imageIdsProviders.js';
4
4
  export class CacheData {
5
5
  static setCacheDataInternal(type, query, value) {
6
6
  let valueMap = this.mapCacheData.get(type);
@@ -1,5 +1,5 @@
1
- import { MetadataModules } from '../../enums';
2
- import { addTypedProvider, toLowerCamelTag } from '../../metaData';
1
+ import { MetadataModules } from '../../enums/index.js';
2
+ import { addTypedProvider, toLowerCamelTag } from '../../metaData.js';
3
3
  export function calibrationModuleProvider(next, query, data, options) {
4
4
  if (!data) {
5
5
  return next(query, data, options);
@@ -1,8 +1,8 @@
1
1
  import { vec3 } from 'gl-matrix';
2
- import { dicomSplit } from './dicomSplit';
3
- import { addTypedProvider, getMetaData } from '../../metaData';
4
- import { MetadataModules } from '../../enums';
5
- import { isEqual } from '../isEqual';
2
+ import { dicomSplit } from './dicomSplit.js';
3
+ import { addTypedProvider, getMetaData } from '../../metaData.js';
4
+ import { MetadataModules } from '../../enums/index.js';
5
+ import { isEqual } from '../isEqual.js';
6
6
  export const combineFrameInstance = (frame, instance) => {
7
7
  const { PerFrameFunctionalGroupsSequence, SharedFunctionalGroupsSequence, NumberOfFrames, ImageType, } = instance;
8
8
  if (NumberOfFrames < 2) {
@@ -1,5 +1,5 @@
1
- import { MetadataModules } from '../../enums';
2
- import { addTypedProvider } from '../../metaData';
1
+ import { MetadataModules } from '../../enums/index.js';
2
+ import { addTypedProvider } from '../../metaData.js';
3
3
  const PIXEL_DATA_KEYS = [
4
4
  'PixelData',
5
5
  'FramePixelData',
@@ -1,5 +1,5 @@
1
- import { MetadataModules } from '../../enums';
2
- import { addTypedProvider, metadataModuleProvider } from '../../metaData';
1
+ import { MetadataModules } from '../../enums/index.js';
2
+ import { addTypedProvider, metadataModuleProvider } from '../../metaData.js';
3
3
  export function dataLookup(dataType) {
4
4
  return (next, query, data, options) => {
5
5
  data ||= metadataModuleProvider(dataType, query, options?.[dataType]);
@@ -1,5 +1,5 @@
1
- import { addTypedProvider } from '../../metaData';
2
- import { MetadataModules } from '../../enums';
1
+ import { addTypedProvider } from '../../metaData.js';
2
+ import { MetadataModules } from '../../enums/index.js';
3
3
  function base64ToUint8Array(base64) {
4
4
  const binaryString = atob(base64);
5
5
  const bytes = new Uint8Array(binaryString.length);
@@ -1 +1 @@
1
- export type { EcgModuleMetadata } from '../../types';
1
+ export type { EcgModuleMetadata } from '../../types/index.js';
@@ -1,5 +1,5 @@
1
- import { MetadataModules } from '../../enums';
2
- import { type TypedProvider } from '../../metaData';
1
+ import { MetadataModules } from '../../enums/index.js';
2
+ import { type TypedProvider } from '../../metaData.js';
3
3
  export declare const FRAME_IMAGE_IDS = MetadataModules.FRAME_IMAGE_IDS;
4
4
  export declare const BASE_IMAGE_ID = MetadataModules.BASE_IMAGE_ID;
5
5
  export type ImageIdTransformPlugin = TypedProvider;
@@ -1,6 +1,6 @@
1
- import { MetadataModules } from '../../enums';
2
- import { addTypedProvider, getTyped, metadataModuleProvider, } from '../../metaData';
3
- import { getNaturalizedNumber, getNaturalizedString, } from '../getNaturalizedField';
1
+ import { MetadataModules } from '../../enums/index.js';
2
+ import { addTypedProvider, getTyped, metadataModuleProvider, } from '../../metaData.js';
3
+ import { getNaturalizedNumber, getNaturalizedString, } from '../getNaturalizedField.js';
4
4
  export const FRAME_IMAGE_IDS = MetadataModules.FRAME_IMAGE_IDS;
5
5
  export const BASE_IMAGE_ID = MetadataModules.BASE_IMAGE_ID;
6
6
  const BASE_IMAGE_ID_PATH_FILTER_PRIORITY = 9_000;
@@ -1,4 +1,4 @@
1
- import type { ImagePlaneModuleMetadata } from '../../types';
1
+ import type { ImagePlaneModuleMetadata } from '../../types/index.js';
2
2
  export declare const getImagePlaneCalibrated: (next: any, imageId: string, instance: any, options: any) => ImagePlaneModuleMetadata;
3
3
  export declare function registerImagePlaneCalibrated(): void;
4
4
  export default getImagePlaneCalibrated;
@@ -1,9 +1,9 @@
1
- import { MetadataModules } from '../../enums';
2
- import { toFiniteNumber } from '../toNumber';
3
- import { getNaturalizedNumber } from '../getNaturalizedField';
4
- import calibratedPixelSpacingMetadataProvider from '../calibratedPixelSpacingMetadataProvider';
5
- import getPixelSpacingInformation from '../getPixelSpacingInformation';
6
- import { addTypedProvider } from '../../metaData';
1
+ import { MetadataModules } from '../../enums/index.js';
2
+ import { toFiniteNumber } from '../toNumber.js';
3
+ import { getNaturalizedNumber } from '../getNaturalizedField.js';
4
+ import calibratedPixelSpacingMetadataProvider from '../calibratedPixelSpacingMetadataProvider.js';
5
+ import getPixelSpacingInformation from '../getPixelSpacingInformation.js';
6
+ import { addTypedProvider } from '../../metaData.js';
7
7
  export const getImagePlaneCalibrated = (next, imageId, instance, options) => {
8
8
  if (!instance) {
9
9
  return next(imageId, instance, options);
@@ -1,18 +1,18 @@
1
- export { dicomSplit } from './dicomSplit';
2
- export * from './imagePlaneCalibrated';
3
- export * from './cacheData';
4
- export * from './imageIdsProviders';
5
- export * from './dataLookup';
6
- export * from './naturalizedHandlers';
7
- export * from './tagModules';
8
- export * from './instanceFromListener';
9
- export * from './calibrationModule';
10
- export * from './combineFrameInstance';
11
- export * from './uriModule';
12
- export * from './pixelDataUpdate';
13
- export * from './transferSyntaxProvider';
14
- export * from './addDicomPart10Instance';
15
- export type { CompressedFrameDataMetadata } from '../../types';
16
- export * from './ecgModule';
17
- export * from './ecgFromInstance';
18
- export * from './scalingFromInstance';
1
+ export { dicomSplit } from './dicomSplit.js';
2
+ export * from './imagePlaneCalibrated.js';
3
+ export * from './cacheData.js';
4
+ export * from './imageIdsProviders.js';
5
+ export * from './dataLookup.js';
6
+ export * from './naturalizedHandlers.js';
7
+ export * from './tagModules.js';
8
+ export * from './instanceFromListener.js';
9
+ export * from './calibrationModule.js';
10
+ export * from './combineFrameInstance.js';
11
+ export * from './uriModule.js';
12
+ export * from './pixelDataUpdate.js';
13
+ export * from './transferSyntaxProvider.js';
14
+ export * from './addDicomPart10Instance.js';
15
+ export type { CompressedFrameDataMetadata } from '../../types/index.js';
16
+ export * from './ecgModule.js';
17
+ export * from './ecgFromInstance.js';
18
+ export * from './scalingFromInstance.js';
@@ -1,17 +1,17 @@
1
- export { dicomSplit } from './dicomSplit';
2
- export * from './imagePlaneCalibrated';
3
- export * from './cacheData';
4
- export * from './imageIdsProviders';
5
- export * from './dataLookup';
6
- export * from './naturalizedHandlers';
7
- export * from './tagModules';
8
- export * from './instanceFromListener';
9
- export * from './calibrationModule';
10
- export * from './combineFrameInstance';
11
- export * from './uriModule';
12
- export * from './pixelDataUpdate';
13
- export * from './transferSyntaxProvider';
14
- export * from './addDicomPart10Instance';
15
- export * from './ecgModule';
16
- export * from './ecgFromInstance';
17
- export * from './scalingFromInstance';
1
+ export { dicomSplit } from './dicomSplit.js';
2
+ export * from './imagePlaneCalibrated.js';
3
+ export * from './cacheData.js';
4
+ export * from './imageIdsProviders.js';
5
+ export * from './dataLookup.js';
6
+ export * from './naturalizedHandlers.js';
7
+ export * from './tagModules.js';
8
+ export * from './instanceFromListener.js';
9
+ export * from './calibrationModule.js';
10
+ export * from './combineFrameInstance.js';
11
+ export * from './uriModule.js';
12
+ export * from './pixelDataUpdate.js';
13
+ export * from './transferSyntaxProvider.js';
14
+ export * from './addDicomPart10Instance.js';
15
+ export * from './ecgModule.js';
16
+ export * from './ecgFromInstance.js';
17
+ export * from './scalingFromInstance.js';
@@ -1,5 +1,5 @@
1
- import { MetadataModules } from '../../enums';
2
- import { addTypedProvider, metadataModuleProvider } from '../../metaData';
1
+ import { MetadataModules } from '../../enums/index.js';
2
+ import { addTypedProvider, metadataModuleProvider } from '../../metaData.js';
3
3
  export const instanceOrigToInstanceProvider = (next, query, data, options) => {
4
4
  return (metadataModuleProvider(MetadataModules.NATURALIZED, query, options) ||
5
5
  next(query, data, options));
@@ -1,8 +1,8 @@
1
1
  import dcmjs from 'dcmjs';
2
- import { MetadataModules } from '../../enums';
3
- import { addAddProvider, addTypedProvider } from '../../metaData';
4
- import { MetaDataIterator, NaturalTagListener } from '../dicomStream';
5
- import { baseImageIdQueryFilter } from './imageIdsProviders';
2
+ import { MetadataModules } from '../../enums/index.js';
3
+ import { addAddProvider, addTypedProvider } from '../../metaData.js';
4
+ import { MetaDataIterator, NaturalTagListener } from '../dicomStream/index.js';
5
+ import { baseImageIdQueryFilter } from './imageIdsProviders.js';
6
6
  const { AsyncDicomReader } = dcmjs.async;
7
7
  const NATURAL_BASE_IMAGE_ID_FILTER_PRIORITY = 60_000;
8
8
  const NATURALIZED_ADD_HANDLER_PRIORITY = 30_000;
@@ -1,6 +1,6 @@
1
- import { MetadataModules } from '../../enums';
2
- import { addTypedProvider } from '../../metaData';
3
- import { getSingleBufferFromArray } from '../bulkDataFromArray';
1
+ import { MetadataModules } from '../../enums/index.js';
2
+ import { addTypedProvider } from '../../metaData.js';
3
+ import { getSingleBufferFromArray } from '../bulkDataFromArray.js';
4
4
  function normalizePaletteLUT(raw) {
5
5
  if (raw instanceof ArrayBuffer) {
6
6
  const len = raw.byteLength;
@@ -1,5 +1,5 @@
1
- import { addTypedProvider } from '../../metaData';
2
- import { MetadataModules } from '../../enums';
1
+ import { addTypedProvider } from '../../metaData.js';
2
+ import { MetadataModules } from '../../enums/index.js';
3
3
  import { calculateSUVScalingFactors } from '@cornerstonejs/calculate-suv';
4
4
  function timeToString(v) {
5
5
  if (typeof v === 'string')
@@ -1,4 +1,4 @@
1
- import { type TypedProvider } from '../../metaData';
1
+ import { type TypedProvider } from '../../metaData.js';
2
2
  export declare function clearTagModules(): void;
3
3
  export declare function tagModules(module: string, dataLookupName?: string): TypedProvider;
4
4
  export declare const MODULE_PRIORITY: {
@@ -1,8 +1,8 @@
1
- import { addTypedProvider } from '../../metaData';
2
- import { mapModuleTags } from '../Tags';
3
- import { dataLookup, DATA_PRIORITY, instanceLookup } from './dataLookup';
4
- import { makeArrayLike } from './makeArrayLike';
5
- import { metadataLog } from '../logging';
1
+ import { addTypedProvider } from '../../metaData.js';
2
+ import { mapModuleTags } from '../Tags.js';
3
+ import { dataLookup, DATA_PRIORITY, instanceLookup } from './dataLookup.js';
4
+ import { makeArrayLike } from './makeArrayLike.js';
5
+ import { metadataLog } from '../logging.js';
6
6
  const log = metadataLog.getLogger('tagModules');
7
7
  const mapModules = new Map();
8
8
  export function clearTagModules() {
@@ -1,6 +1,6 @@
1
- import { MetadataModules } from '../../enums';
2
- import { addTypedProvider } from '../../metaData';
3
- import isVideoTransferSyntax from '../isVideoTransferSyntax';
1
+ import { MetadataModules } from '../../enums/index.js';
2
+ import { addTypedProvider } from '../../metaData.js';
3
+ import isVideoTransferSyntax from '../isVideoTransferSyntax.js';
4
4
  export function transferSyntaxProvider(next, query, data, options) {
5
5
  const fmiBase = next(query, data, options);
6
6
  if (fmiBase) {
@@ -1,5 +1,5 @@
1
- import { MetadataModules } from '../../enums';
2
- import { addTypedProvider } from '../../metaData';
1
+ import { MetadataModules } from '../../enums/index.js';
2
+ import { addTypedProvider } from '../../metaData.js';
3
3
  export const frameRangeExtractor = /(\/frames\/|[&?]frameNumber=|[&?]frame=)([^/&?]*)(.*)/i;
4
4
  export function getUriModule(imageId) {
5
5
  const framesMatch = imageId.match(frameRangeExtractor);
@@ -1,2 +1,2 @@
1
- import type { ModuleTagEntry } from './index';
1
+ import type { ModuleTagEntry } from './index.js';
2
2
  export declare const tags: ModuleTagEntry[];
@@ -1,2 +1,2 @@
1
- import type { ModuleTagEntry } from './index';
1
+ import type { ModuleTagEntry } from './index.js';
2
2
  export declare const tags: ModuleTagEntry[];
@@ -1,2 +1,2 @@
1
- import type { ModuleTagEntry } from './index';
1
+ import type { ModuleTagEntry } from './index.js';
2
2
  export declare const tags: ModuleTagEntry[];
@@ -1,2 +1,2 @@
1
- import type { ModuleTagEntry } from './index';
1
+ import type { ModuleTagEntry } from './index.js';
2
2
  export declare const tags: ModuleTagEntry[];
@@ -1,2 +1,2 @@
1
- import type { ModuleTagEntry } from './index';
1
+ import type { ModuleTagEntry } from './index.js';
2
2
  export declare const tags: ModuleTagEntry[];
@@ -1,2 +1,2 @@
1
- import type { ModuleTagEntry } from './index';
1
+ import type { ModuleTagEntry } from './index.js';
2
2
  export declare const tags: ModuleTagEntry[];
@@ -1,2 +1,2 @@
1
- import type { ModuleTagEntry } from './index';
1
+ import type { ModuleTagEntry } from './index.js';
2
2
  export declare const tags: ModuleTagEntry[];
@@ -1,2 +1,2 @@
1
- import type { ModuleTagEntry } from './index';
1
+ import type { ModuleTagEntry } from './index.js';
2
2
  export declare const tags: ModuleTagEntry[];
@@ -1,25 +1,25 @@
1
- import { MetadataModules } from '../../enums';
2
- import { tags as transferSyntaxTags } from './transferSyntax';
3
- import { tags as cineTags } from './cine';
4
- import { tags as ptIsotopeTags } from './ptIsotope';
5
- import { tags as radiopharmaceuticalInfoTags } from './radiopharmaceuticalInfo';
6
- import { tags as ptImageTags } from './ptImage';
7
- import { tags as ptSeriesTags } from './ptSeries';
8
- import { tags as patientTags } from './patient';
9
- import { tags as patientStudyTags } from './patientStudy';
10
- import { tags as generalStudyTags } from './generalStudy';
11
- import { tags as generalSeriesTags } from './generalSeries';
12
- import { tags as clinicalTrialTags } from './clinicalTrial';
13
- import { tags as sopCommonTags } from './sopCommon';
14
- import { tags as ecgTags } from './ecg';
15
- import { tags as generalImageTags } from './generalImage';
16
- import { tags as imagePlaneTags } from './imagePlane';
17
- import { tags as imagePixelTags } from './imagePixel';
18
- import { tags as voiLutTags } from './voiLut';
19
- import { tags as modalityLutTags } from './modalityLut';
20
- import { tags as ultrasoundEnhancedRegionTags } from './ultrasoundEnhancedRegion';
21
- import { tags as usRegionChildTags } from './usRegionChild';
22
- import { tags as unassignedTags } from './unassigned';
1
+ import { MetadataModules } from '../../enums/index.js';
2
+ import { tags as transferSyntaxTags } from './transferSyntax.js';
3
+ import { tags as cineTags } from './cine.js';
4
+ import { tags as ptIsotopeTags } from './ptIsotope.js';
5
+ import { tags as radiopharmaceuticalInfoTags } from './radiopharmaceuticalInfo.js';
6
+ import { tags as ptImageTags } from './ptImage.js';
7
+ import { tags as ptSeriesTags } from './ptSeries.js';
8
+ import { tags as patientTags } from './patient.js';
9
+ import { tags as patientStudyTags } from './patientStudy.js';
10
+ import { tags as generalStudyTags } from './generalStudy.js';
11
+ import { tags as generalSeriesTags } from './generalSeries.js';
12
+ import { tags as clinicalTrialTags } from './clinicalTrial.js';
13
+ import { tags as sopCommonTags } from './sopCommon.js';
14
+ import { tags as ecgTags } from './ecg.js';
15
+ import { tags as generalImageTags } from './generalImage.js';
16
+ import { tags as imagePlaneTags } from './imagePlane.js';
17
+ import { tags as imagePixelTags } from './imagePixel.js';
18
+ import { tags as voiLutTags } from './voiLut.js';
19
+ import { tags as modalityLutTags } from './modalityLut.js';
20
+ import { tags as ultrasoundEnhancedRegionTags } from './ultrasoundEnhancedRegion.js';
21
+ import { tags as usRegionChildTags } from './usRegionChild.js';
22
+ import { tags as unassignedTags } from './unassigned.js';
23
23
  export const USRegionChild = 'usRegionChild';
24
24
  export const CLINICAL_TRIAL = 'clinicalTrialModule';
25
25
  export const RadiopharmaceuticalInfoModule = 'RadiopharmaceuticalInfo';
@@ -1,2 +1,2 @@
1
- import type { ModuleTagEntry } from './index';
1
+ import type { ModuleTagEntry } from './index.js';
2
2
  export declare const tags: ModuleTagEntry[];
@@ -1,2 +1,2 @@
1
- import type { ModuleTagEntry } from './index';
1
+ import type { ModuleTagEntry } from './index.js';
2
2
  export declare const tags: ModuleTagEntry[];
@@ -1,2 +1,2 @@
1
- import type { ModuleTagEntry } from './index';
1
+ import type { ModuleTagEntry } from './index.js';
2
2
  export declare const tags: ModuleTagEntry[];
@@ -1,2 +1,2 @@
1
- import type { ModuleTagEntry } from './index';
1
+ import type { ModuleTagEntry } from './index.js';
2
2
  export declare const tags: ModuleTagEntry[];
@@ -1,2 +1,2 @@
1
- import type { ModuleTagEntry } from './index';
1
+ import type { ModuleTagEntry } from './index.js';
2
2
  export declare const tags: ModuleTagEntry[];
@@ -1,2 +1,2 @@
1
- import type { ModuleTagEntry } from './index';
1
+ import type { ModuleTagEntry } from './index.js';
2
2
  export declare const tags: ModuleTagEntry[];
@@ -1,2 +1,2 @@
1
- import type { ModuleTagEntry } from './index';
1
+ import type { ModuleTagEntry } from './index.js';
2
2
  export declare const tags: ModuleTagEntry[];
@@ -1,2 +1,2 @@
1
- import type { ModuleTagEntry } from './index';
1
+ import type { ModuleTagEntry } from './index.js';
2
2
  export declare const tags: ModuleTagEntry[];
@@ -1,2 +1,2 @@
1
- import type { ModuleTagEntry } from './index';
1
+ import type { ModuleTagEntry } from './index.js';
2
2
  export declare const tags: ModuleTagEntry[];
@@ -1,2 +1,2 @@
1
- import type { ModuleTagEntry } from './index';
1
+ import type { ModuleTagEntry } from './index.js';
2
2
  export declare const tags: ModuleTagEntry[];
@@ -1,2 +1,2 @@
1
- import type { ModuleTagEntry } from './index';
1
+ import type { ModuleTagEntry } from './index.js';
2
2
  export declare const tags: ModuleTagEntry[];
@@ -1,2 +1,2 @@
1
- import type { ModuleTagEntry } from './index';
1
+ import type { ModuleTagEntry } from './index.js';
2
2
  export declare const tags: ModuleTagEntry[];
@@ -1,2 +1,2 @@
1
- import type { ModuleTagEntry } from './index';
1
+ import type { ModuleTagEntry } from './index.js';
2
2
  export declare const tags: ModuleTagEntry[];
@@ -1,5 +1,5 @@
1
- import * as metaData from '../metaData';
2
- import { toFiniteNumber } from './toNumber';
1
+ import * as metaData from '../metaData.js';
2
+ import { toFiniteNumber } from './toNumber.js';
3
3
  function generateFrameImageId(baseImageId, frameNumber) {
4
4
  const framePattern = /\/frames\/\d+/;
5
5
  const queryFramePattern = /([?&])frame=\d+/;
@@ -1 +1 @@
1
- export declare const version = "5.1.4";
1
+ export declare const version = "5.2.0";
@@ -1 +1 @@
1
- export const version = '5.1.4';
1
+ export const version = '5.2.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/metadata",
3
- "version": "5.1.4",
3
+ "version": "5.2.0",
4
4
  "description": "Cornerstone3D Metadata Foundation - Provider chain, DICOM stream parsing, tag modules, and series splitting",
5
5
  "module": "./dist/esm/index.js",
6
6
  "types": "./dist/esm/index.d.ts",
@@ -11,44 +11,44 @@
11
11
  "sideEffects": false,
12
12
  "exports": {
13
13
  ".": {
14
+ "types": "./dist/esm/index.d.ts",
14
15
  "import": "./dist/esm/index.js",
15
- "node": "./dist/esm/index.js",
16
- "types": "./dist/esm/index.d.ts"
16
+ "default": "./dist/esm/index.js"
17
17
  },
18
18
  "./metaData": {
19
+ "types": "./dist/esm/metaData.d.ts",
19
20
  "import": "./dist/esm/metaData.js",
20
- "node": "./dist/esm/metaData.js",
21
- "types": "./dist/esm/metaData.d.ts"
21
+ "default": "./dist/esm/metaData.js"
22
22
  },
23
23
  "./enums": {
24
+ "types": "./dist/esm/enums/index.d.ts",
24
25
  "import": "./dist/esm/enums/index.js",
25
- "node": "./dist/esm/enums/index.js",
26
- "types": "./dist/esm/enums/index.d.ts"
26
+ "default": "./dist/esm/enums/index.js"
27
27
  },
28
28
  "./enums/*": {
29
+ "types": "./dist/esm/enums/*.d.ts",
29
30
  "import": "./dist/esm/enums/*.js",
30
- "node": "./dist/esm/enums/*.js",
31
- "types": "./dist/esm/enums/*.d.ts"
31
+ "default": "./dist/esm/enums/*.js"
32
32
  },
33
33
  "./utilities": {
34
+ "types": "./dist/esm/utilities/index.d.ts",
34
35
  "import": "./dist/esm/utilities/index.js",
35
- "node": "./dist/esm/utilities/index.js",
36
- "types": "./dist/esm/utilities/index.d.ts"
36
+ "default": "./dist/esm/utilities/index.js"
37
37
  },
38
38
  "./utilities/dicomStream": {
39
+ "types": "./dist/esm/utilities/dicomStream/index.d.ts",
39
40
  "import": "./dist/esm/utilities/dicomStream/index.js",
40
- "node": "./dist/esm/utilities/dicomStream/index.js",
41
- "types": "./dist/esm/utilities/dicomStream/index.d.ts"
41
+ "default": "./dist/esm/utilities/dicomStream/index.js"
42
42
  },
43
43
  "./utilities/metadataProvider": {
44
+ "types": "./dist/esm/utilities/metadataProvider/index.d.ts",
44
45
  "import": "./dist/esm/utilities/metadataProvider/index.js",
45
- "node": "./dist/esm/utilities/metadataProvider/index.js",
46
- "types": "./dist/esm/utilities/metadataProvider/index.d.ts"
46
+ "default": "./dist/esm/utilities/metadataProvider/index.js"
47
47
  },
48
48
  "./utilities/*": {
49
+ "types": "./dist/esm/utilities/*.d.ts",
49
50
  "import": "./dist/esm/utilities/*.js",
50
- "node": "./dist/esm/utilities/*.js",
51
- "types": "./dist/esm/utilities/*.d.ts"
51
+ "default": "./dist/esm/utilities/*.js"
52
52
  },
53
53
  "./types": {
54
54
  "types": "./dist/esm/types/index.d.ts"
@@ -57,18 +57,19 @@
57
57
  "types": "./dist/esm/types/*.d.ts"
58
58
  },
59
59
  "./version": {
60
+ "types": "./dist/esm/version.d.ts",
60
61
  "import": "./dist/esm/version.js",
61
- "node": "./dist/esm/version.js",
62
- "types": "./dist/esm/version.d.ts"
63
- }
62
+ "default": "./dist/esm/version.js"
63
+ },
64
+ "./package.json": "./package.json"
64
65
  },
65
66
  "publishConfig": {
66
67
  "access": "public"
67
68
  },
68
69
  "scripts": {
69
70
  "prebuild": "node ../../scripts/generate-version.js ./",
70
- "build:esm": "pnpm run prebuild && tsc --project ./tsconfig.json",
71
- "build:esm:watch": "tsc --project ./tsconfig.json --watch",
71
+ "build:esm": "pnpm run prebuild && tsc --project ./tsconfig.json && tsc-alias -p ./tsconfig.json --resolve-full-paths && node ../../scripts/write-dist-esm-package-json.js ./",
72
+ "build:esm:watch": "sh -c 'tsc-alias -p ./tsconfig.json --resolve-full-paths --watch & alias_pid=$!; node ../../scripts/write-dist-esm-package-json.js ./ --watch & writer_pid=$!; trap \"kill $alias_pid $writer_pid\" EXIT; tsc --project ./tsconfig.json --watch'",
72
73
  "clean": "rm -rf node_modules/.cache/storybook && shx rm -rf dist",
73
74
  "clean:deep": "pnpm run clean && shx rm -rf node_modules",
74
75
  "build": "pnpm run build:esm",
@@ -80,7 +81,7 @@
80
81
  },
81
82
  "dependencies": {
82
83
  "@cornerstonejs/calculate-suv": "1.0.3",
83
- "@cornerstonejs/utils": "5.1.4",
84
+ "@cornerstonejs/utils": "5.2.0",
84
85
  "dcmjs": "0.50.1",
85
86
  "gl-matrix": "3.4.3"
86
87
  },
@@ -95,5 +96,5 @@
95
96
  "type": "individual",
96
97
  "url": "https://ohif.org/donate"
97
98
  },
98
- "gitHead": "357796f885445b74f801c5ab727d708345b4e729"
99
+ "gitHead": "e3f8b2ba29ee50d4a7039e3f1e7e7fb49db58130"
99
100
  }