Britefury / django-labeller

An image labelling tool for creating segmentation data sets, for Django and Flask.
MIT License
140 stars 40 forks source link

Adding new image modalities #20

Open sshkhr opened 1 year ago

sshkhr commented 1 year ago

I am trying to integrate support for different image modalities (like DICOM). I overloaded the image loading functions in image_labelling_tool/labelled_image.py, and the images are being read fine and their size passed correctly to the flask labeller. However, when rendering the image from the img_url, the flask labeller does not consider the PIL image that was read by labelled_image, and instead tries to read/render directly from the file path and fails. Any suggestions on how to fix this?

jaggzh commented 1 year ago

Did you get this working? I've not looked at the code for this part of the app, but it sounds like they are probably just handing the name around. You'd have to hand around the other image data (you're converting dicom slices to PIL images?), or generalize the routines used by the other areas (flask labeler) to accept calls (and additional data) for the dicom imagery in addition to the normal images. Possibly a simple wrapper would work for that, but I'm not sure how the data's handed around, if you're using single-image dicoms, slices, etc.