Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tools): Add support for additional region data types and length variants #1736

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions packages/tools/src/utilities/getCalibratedUnits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,31 @@ import { Enums, utilities } from '@cornerstonejs/core';
const { CalibrationTypes } = Enums;
const PIXEL_UNITS = 'px';

/**
* DICOM Region Data Types as defined in the DICOM standard
* https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.8.5.5.html#sect_C.8.5.5.1.2
*/
const SUPPORTED_REGION_DATA_TYPES = [
1, // Tissue
2, // Color Flow
3, // PW Spectral Doppler
4, // CW Spectral Doppler
];

const SUPPORTED_LENGTH_VARIANT = [
'3,3', // x: cm & y:cm
'3,3', // x: cm & y:cm
'4,7', // x: seconds & y : cm/sec
];

const SUPPORTED_PROBE_VARIANT = [
'4,3', // x: seconds & y : cm
'4,3', // x: seconds & y : cm
'4,7', // x: seconds & y : cm/sec
];

/**
* DICOM Pixel Physical Units as defined in the DICOM standard
* https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.8.5.5.html#sect_C.8.5.5.1.6
*/
const UNIT_MAPPING = {
0: 'px',
1: 'percent',
Expand Down
Loading