[IDC-1994] Sort series list by SeriesNumber, and sort by same SeriesNumber by date/time. (#2010)
* Sort based on SeriesNumber and SeriesDate/SeriesTime. * Harden, and perform final sort in algorithm if last N entries have the same SeriesNumber. * Switch to insertion rather than sorting as sorting is too slow. Reimplement low priority sorting into new insertion method. * Fix local file viewing.
This commit is contained in:
1 parent
ef28fa2ac1
commit
dbf0501031
12 files changed
+140
-133
No files matched your search
@@ -19,6 +19,7 @@ import UserManagerContext from '../context/UserManagerContext';
|
||||
import AppContext from '../context/AppContext';
|
||||
|
||||
import './Viewer.css';
|
||||
import { finished } from 'stream';
|
||||
|
||||
class Viewer extends Component {
|
||||
static propTypes = {
|
||||
@@ -189,6 +190,7 @@ class Viewer extends Component {
|
||||
currentTimepointId,
|
||||
]);
|
||||
}
|
||||
|
||||
this.setState({
|
||||
thumbnails: _mapStudiesToThumbnails(studies),
|
||||
});
|
||||
@@ -197,6 +199,7 @@ class Viewer extends Component {
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
const { studies, isStudyLoaded } = this.props;
|
||||
|
||||
if (studies !== prevProps.studies) {
|
||||
this.setState({
|
||||
thumbnails: _mapStudiesToThumbnails(studies),
|
||||
@@ -355,7 +358,6 @@ export default withDialog(Viewer);
|
||||
* a mapping layer?
|
||||
*
|
||||
* TODO[react]:
|
||||
* - Add sorting of display sets
|
||||
* - Add showStackLoadingProgressBar option
|
||||
*
|
||||
* @param {Study[]} studies
|
||||
@@ -369,9 +371,9 @@ const _mapStudiesToThumbnails = function(studies) {
|
||||
const {
|
||||
displaySetInstanceUID,
|
||||
SeriesDescription,
|
||||
SeriesNumber,
|
||||
InstanceNumber,
|
||||
numImageFrames,
|
||||
SeriesNumber,
|
||||
} = displaySet;
|
||||
|
||||
let imageId;
|
||||
@@ -395,9 +397,9 @@ const _mapStudiesToThumbnails = function(studies) {
|
||||
altImageText,
|
||||
displaySetInstanceUID,
|
||||
SeriesDescription,
|
||||
SeriesNumber,
|
||||
InstanceNumber,
|
||||
numImageFrames,
|
||||
SeriesNumber,
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -77,7 +77,8 @@ class ViewerLocalFileData extends Component {
|
||||
study.displaySets =
|
||||
study.displaySets ||
|
||||
studyMetadata.createDisplaySets(sopClassHandlerModules);
|
||||
studyMetadata.setDisplaySets(study.displaySets);
|
||||
|
||||
debugger;
|
||||
|
||||
studyMetadata.forEachDisplaySet(displayset => {
|
||||
displayset.localFile = true;
|
||||
|
||||
@@ -47,7 +47,6 @@ const _promoteList = (study, studyMetadata, filters, isFilterStrategy) => {
|
||||
let promoted = false;
|
||||
// Promote only if no filter should be applied
|
||||
if (!isFilterStrategy) {
|
||||
_sortStudyDisplaySet(study, studyMetadata);
|
||||
promoted = _promoteStudyDisplaySet(study, studyMetadata, filters);
|
||||
}
|
||||
|
||||
@@ -193,12 +192,6 @@ const _updateStudyDisplaySets = (study, studyMetadata) => {
|
||||
if (study.derivedDisplaySets) {
|
||||
studyMetadata._addDerivedDisplaySets(study.derivedDisplaySets);
|
||||
}
|
||||
|
||||
studyMetadata.setDisplaySets(study.displaySets);
|
||||
};
|
||||
|
||||
const _sortStudyDisplaySet = (study, studyMetadata) => {
|
||||
studyMetadata.sortDisplaySets(study.displaySets);
|
||||
};
|
||||
|
||||
const _thinStudyData = study => {
|
||||
|
||||
Reference in new issue
Block a user