Retrieve FrameIncrementPointer as an attribute and FrameTimeVector as a float array via DICOMWeb and DIMSE
This commit is contained in:
1 parent
255b60e2fc
commit
8e9265ab23
9 files changed
+93
-2
No files matched your search
@@ -1,3 +1,5 @@
|
||||
import { parseFloatArray } from '../../lib/parseFloatArray';
|
||||
|
||||
/**
|
||||
* Parses the SourceImageSequence, if it exists, in order
|
||||
* to return a ReferenceSOPInstanceUID. The ReferenceSOPInstanceUID
|
||||
@@ -16,6 +18,21 @@ function getSourceImageInstanceUid(instance) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of the element (e.g. '00280009')
|
||||
*
|
||||
* @param element - The group/element of the element (e.g. '00280009')
|
||||
* @param defaultValue - The default value to return if the element does not exist
|
||||
* @returns {*}
|
||||
*/
|
||||
function getValue(element, defaultValue) {
|
||||
if (!element || !element.value) {
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
return element.value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses result data from a DIMSE search into Study MetaData
|
||||
* Returns an object populated with study metadata, including the
|
||||
@@ -102,7 +119,9 @@ function resultDataToStudyMetadata(studyInstanceUid, resultData) {
|
||||
viewPosition: instance[0x00185101],
|
||||
acquisitionDatetime: instance[0x0008002A],
|
||||
numFrames: parseFloat(instance[0x00280008]),
|
||||
frameIncrementPointer: getValue(instance[0x00280009]),
|
||||
frameTime: parseFloat(instance[0x00181063]),
|
||||
frameTimeVector: parseFloatArray(instance[0x00181065]),
|
||||
lossyImageCompression: instance[0x00282110],
|
||||
derivationDescription: instance[0x00282111],
|
||||
lossyImageCompressionRatio: instance[0x00282112],
|
||||
|
||||
Reference in new issue
Block a user