This package implements a bounch of sorting algorithms that can be applied to a list of object, that can then be queried to obtain the next object(s) in the queue. The idea is to have a single manager for download / upload queues. At the moment object in the list are meant to represent DICOM instances, so they are in the form:
{
key,
imageId,
seriesId,
studyId
}
but in the future this could be generalized to generic use cases.
import { DownloadManager } from "dv-download-manager";
let dm = new DownloadManager("alternate", false); // "alternate" is the sorting algorithm
dm.addSeries(seriesId, seriesId, "todo-studyId", images); // add a series to the queue
let slot = dm.getNextSlot(1) // get a single slot of dimension 1
dm.removeSeries(id); // remove a series from the queue
- concat
- alternate
- threeParted
TODO
Download Node.js. Run this followed commands:
# Install dependencies (only the first time)
yarn install
# Develop with hot reload
yarn dev
# Build for production in the dist/ directory
yarn build
# Generate documentation in the docs/ folder
yarn docs
# Run tests with jest
yarn testAdd addPriorityImage
Add tests
Fix build & bundle
[BREAKING] Order the items by a generic "key" property.
First version