cdorais1 / CCS3D

The cornerstone3D-beta version, better tuned for calcified plaque annotation.
MIT License
0 stars 3 forks source link

Sorting DICOMs prior to displaying for annotation #8

Open cdorais1 opened 2 years ago

cdorais1 commented 2 years ago

Summary: Images must be sorted according to their instance number prior to display to render a complete, in order image and facilitate access to different planar views.

Current Findings:

The Cornerstone Library doesn't handle sorting files by their instance number; the only way currently known to access the instance number is to create a DataSet object through the dicomParser library with a parameter of a Promise being passed in.

6/20: Previous attempts to enable this feature has been to pass the stack of images into a function that converts the files into promises and then into dataSet objects, before calling the relevant tag and sorting the files by their associated instance number and returning the output to be loaded into the WADOURI file manager and passed to the loadImage() function. The main issue is that Promises are evaluated at the end of a series of calls. The two outcomes attained through this method have been timeouts due to slow processing of large stacks of images, or the first image in the drag and drop of files being rendered and the rest being sorted after. This resulted in a duplicate of the first image, showing up as "dicom:0" in the file manager and "dicom:x" where it is supposed to be located. There had not been a discovered method to remove this duplicate image from its spot as the first loaded image, which could be a fault of the Cornerstone library or of the user not being aware of an effective method to remove.

Additional notes will be added as this task is researched.