Managing Strange Bit Dicom Images !

I want to convert 13, 14, 15 bit which are also known as strange bit Dicom images into 16 bit images. I want to handle this stuff in RecievedInstanceCallback using Python.

Even if reference is not in python, any references would be appreciated! Thank you so much in advance!

Hello,

The proper way to implement this logic in a plugin is rather to listen to the “orthanc.ChangeType.NEW_INSTANCE” event:

https://book.orthanc-server.com/plugins/python.html#listening-to-changes

Your Python plugin would listen to this event, download the source DICOM image using “orthanc.RestApiGet()”, would fix it using e.g. pydicom, would upload the fixed instance using “orthanc.RestApiPost()”, then finally would delete the originally received instance using “orthanc.RestApiDelete()”.

Regards,
Sébastien-

I guess, I have posted things on Orthanc Users group using “New conversation”. Please correct me if I am wrong and if no please guide me with the same.

I am very much new to Orthanc community, things might sound a bit silly but I urge you to kindly cooperate and help me with the same.

Also please guide me with the query which I have posted in here! Thanks!

Hello,

You haven’t explained in what aspects my previous answer was not sufficient to solve your issue.

Regards,
Sébastien-

Probably in all aspects because my problem is to know if we have any solution to convert 13, 14 and 15 bits images into 16 bits and I am really not sure what answers I am getting from you!

I already explained that I am new to this community and I want an answer to a simple question which is mentioned above.

If I am at a wrong place then please let me know that “Yes, It’s the wrong place and the correct place is: {SOME REFERENCE LINK}” and if it’s a right then please revert with some useful links. Thanks! Regards!

Converting 13, 14 and 15 bits DICOM images to 16 bits DICOM images is not the role of a PACS server like Orthanc, who will happily store whatever bit depth comes in.

As indicated in my first answer, you could easily create an Orthanc plugin that will automatically do this conversion, either in C++ using DCMTK or GDCM, or in Python using pydicom:
https://book.orthanc-server.com/developers/creating-plugins.html (C++)
https://book.orthanc-server.com/plugins/python.html (Python)

You can easily find {SOME REFERENCE LINK} for DCMTK, GDCM and pydicom using your favorite Web search engine:
https://dicom.offis.de/dcmtk.php.en
https://gdcm.sourceforge.net/wiki/index.php/Main_Page
https://pydicom.github.io/pydicom/stable/

If your company doesn’t have the in-house technical knowledge about DICOM to create such C++/Python plugins, I kindly invite you to get in touch with our network of professional partners:

https://book.orthanc-server.com/users/support.html#finding-professional-assistance

Regards,
Sébastien-

That really helps. Thank you so much for the quick and easy response. I really appreciate.

Looking forward to working with you in the future!

Thanks & Best Regards!