FNNDSC / FNNDSC/ami

[bug] orderFrames and multi frame DICOM files

Open
#263 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
745
Forks
212
PR merge metrics
No merged PRs in 30d

Description

### Description
Frames in stack can not be ordered correctly after merging 2+ multi frame DICOM files

#### Steps to Reproduce
For example, take 2 US Cardio multi frame DICOM files:
```
const series = loader.data[0].mergeSeries(loader.data);
series.stack[0].prepare();
```

#### Expected Results
As a result I expect to see all frames from first file, then all frames from second file.

#### Actual Results
However, order of frames in series.stack[0].frame will look like: first frame from both file, second frame from both file...

#### Source of the problem
orderFrames function works incorrectly.
If frame.dimensionIndexValues is null, it uses frame.imagePosition or frame.instanceNumber or frame.sopInstanceUID, but only one of this three values.
When 2+ multi frame files are merged at least 2 values should be used to get correct order of frames.

### Versions
- AMI: v0.0.23dev

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.