How to perform Image processing with Dicom Images in Android?

305 views Asked by At

I am using imebra library to display dicom image and it converts dicom image to bitmap to display. So when i perform manipulation with the image can cause memory issue. Is there any other way in Android for Window Leveling.

1

There are 1 answers

0
Paolo Brandoli On

There is a sample application using Imebra4 which just displays a DICOM file.

In order to do Window center/width, you have to append a VOILUT transform to the transforms chain, before rendering the image:

From the project code:

// Use a DrawBitmap to build a stream of bytes that can be handled by the
// Android Bitmap class.
TransformsChain chain = new TransformsChain();

//******************************
// INSERT THE VOI LUT HERE:
VOILUT voiLut = new VOILUT();
voiLut.setCenterWidth(center, width);
chain.addTransform(voiLut);
//******************************

DrawBitmap drawBitmap = new DrawBitmap(chain);
ReadMemory memory = drawBitmap.getBitmap(dicomImage, drawBitmapType_t.drawBitmapRGBA, 4);

Imebra v5 (just released) is slightly different: a sample app for Imebra 5 will be released in few days.

Disclaimer: I'm the author of Imebra