@cornerstonejs/core 4.13.7 → 4.14.3

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 @@ export default class VoxelManager<T> {
7
7
  sourceVoxelManager: IVoxelManager<T>;
8
8
  isInObject: (pointLPS: any, pointIJK: any) => boolean;
9
9
  readonly dimensions: Point3;
10
- readonly numberOfComponents: any;
10
+ readonly numberOfComponents: number;
11
11
  getCompleteScalarDataArray?: () => ArrayLike<number>;
12
12
  setCompleteScalarDataArray?: (scalarData: ArrayLike<number>) => void;
13
13
  getRange: () => [number, number];
@@ -178,7 +178,7 @@ export default class VoxelManager {
178
178
  this._set = options._set;
179
179
  this._id = options._id || '';
180
180
  this._getConstructor = options._getConstructor;
181
- this.numberOfComponents = this.numberOfComponents || 1;
181
+ this.numberOfComponents = options.numberOfComponents || 1;
182
182
  this.scalarData = options.scalarData;
183
183
  this._getScalarData = options._getScalarData;
184
184
  this._updateScalarData = options._updateScalarData;
@@ -1 +1 @@
1
- export declare const version = "4.13.7";
1
+ export declare const version = "4.14.3";
@@ -1 +1 @@
1
- export const version = '4.13.7';
1
+ export const version = '4.14.3';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/core",
3
- "version": "4.13.7",
3
+ "version": "4.14.3",
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": "ee360e7ddba785f4980cc4a6d79c058d7d313361"
100
+ "gitHead": "4cd186ae79287b2bd72364157039e8ed91cf250d"
101
101
  }