@cornerstonejs/core 4.14.2 → 4.14.4

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.
@@ -37,7 +37,7 @@ export declare class ImageVolume {
37
37
  additionalDetails?: Record<string, unknown>;
38
38
  voxelManager?: IVoxelManager<number> | IVoxelManager<RGB>;
39
39
  dataType?: PixelDataTypedArrayString;
40
- numTimePoints?: number;
40
+ get numTimePoints(): number;
41
41
  numFrames: number;
42
42
  suppressWarnings: boolean;
43
43
  constructor(props: ImageVolumeProps);
@@ -4,12 +4,16 @@ import VoxelManager from '../../utilities/VoxelManager';
4
4
  import { vtkStreamingOpenGLTexture } from '../../RenderingEngine/vtkClasses';
5
5
  import cache from '../cache';
6
6
  export class ImageVolume {
7
+ get numTimePoints() {
8
+ return typeof this.numDimensionGroups === 'number'
9
+ ? this.numDimensionGroups
10
+ : 1;
11
+ }
7
12
  constructor(props) {
8
13
  this._imageIdsIndexMap = new Map();
9
14
  this._imageURIsIndexMap = new Map();
10
15
  this.cornerstoneImageMetaData = null;
11
16
  this.isPreScaled = false;
12
- this.numTimePoints = null;
13
17
  this.numFrames = null;
14
18
  const { imageIds, scaling, dimensions, spacing, origin, direction, dataType, volumeId, referencedVolumeId, metadata, referencedImageIds, additionalDetails, voxelManager, numberOfComponents, } = props;
15
19
  if (!dataType) {
@@ -89,7 +93,10 @@ export class ImageVolume {
89
93
  });
90
94
  }
91
95
  isDynamicVolume() {
92
- return this.numTimePoints > 1;
96
+ if (this.numTimePoints) {
97
+ return this.numTimePoints > 1;
98
+ }
99
+ return false;
93
100
  }
94
101
  getImageIdIndex(imageId) {
95
102
  return this._imageIdsIndexMap.get(imageId);
@@ -7,7 +7,7 @@ const log = coreLog.getLogger('utilities', 'getClosestImageId');
7
7
  export default function getClosestImageId(imageVolume, worldPos, viewPlaneNormal, options) {
8
8
  const { direction, spacing, imageIds } = imageVolume;
9
9
  const { ignoreSpacing = false } = options || {};
10
- if (imageIds?.length) {
10
+ if (!imageIds?.length) {
11
11
  return;
12
12
  }
13
13
  const kVector = direction.slice(6, 9);
@@ -1 +1 @@
1
- export declare const version = "4.14.2";
1
+ export declare const version = "4.14.4";
@@ -1 +1 @@
1
- export const version = '4.14.2';
1
+ export const version = '4.14.4';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/core",
3
- "version": "4.14.2",
3
+ "version": "4.14.4",
4
4
  "description": "Cornerstone3D Core",
5
5
  "module": "./dist/esm/index.js",
6
6
  "types": "./dist/esm/index.d.ts",
@@ -97,5 +97,5 @@
97
97
  "type": "individual",
98
98
  "url": "https://ohif.org/donate"
99
99
  },
100
- "gitHead": "3f4519a6cd7f13a7e0564263cae4c7f821b6f35b"
100
+ "gitHead": "e4b2818d15ad1082522947d97a05548d0cf99414"
101
101
  }