Create dicom file from tiled leica image

38 views
Skip to first unread message

Alex Price

unread,
Oct 19, 2018, 6:37:14 PM10/19/18
to Fellow Oak DICOM
I am reading tiles from a .svs file from leica using openslide and I need to save these tiles as frames in a dicom file.  I have already done so successfully with motic images and ____ images.  That is, reading a tiled image, converting to a byte[] and saving as dicom files.  The .svs is a 100x image compared to the 20x motic image but the operations are the same.  I have checked the correctness of the allocated bit tag, high bit tag, tile size, and height and width and they are being set correctly.  I can open the dicom file I make from the tiled motic image in microdicom but errors out when opening the dicom file from the leica image.  I have tried on a normal 20x leica image as well and am having no luck  Any thoughts or problem dicom tags that I can be pointed to?  

Thank you

Alex Price

unread,
Oct 22, 2018, 7:23:51 PM10/22/18
to Fellow Oak DICOM
What is interesting is that I can create dicom files, save and view them fine if I write the tiles to disk first, then load them and save as .dcm.  My goal was to take out disk I/O because of how expensive it is and we go to dicom format anyways.  

reini....@aon.at

unread,
Oct 23, 2018, 7:09:05 AM10/23/18
to Fellow Oak DICOM
I dont know about leica and tiled images. But If you say it works fine if you first create the tiles and then create the dcm, then try saving the tiles to MemoryStreams instead of to physical files on disk. That would be much faster.

Alex Price

unread,
Oct 25, 2018, 1:47:25 PM10/25/18
to Fellow Oak DICOM
Yes I was never writing to disk, that is part of why I am writing this application.  It is much faster to do it in memory, turns out the problem was the compression type.  When I saved in memory stream I have to tell it to save as jpeg compression, then I can save as dcm and view it in microdicom.  Now the issue is I cannot view it in orthanc's web viewer as a pyramid file.  

Thank you for your reply.
Reply all
Reply to author
Forward
0 new messages