GSoC Week 4

This week was hectic. I continued learning a java and understanding the components of the LibreHealth Radiology module. I spent my time exploring tutorials, studying the code of the LH-RIS (LibreHealth Radiology Information System), and immersing myself in Orthanc documentation. For context, Orthanc is the PACS (Picture Archiving and Communication System) or in simpler terms it stores the X-ray images and has methods to communicate and share them.

Architecture for better understand,





Challenges and getting past them,

Last week I coded the new properties to enable users to include model information in the admin settings for model selection. I added code in all the pages I found needs adding but when I pushed the changes to my forked repo, there was a pipeline failure. I could not figure out why. I looked at other older commits who did the same and I could see in recent commits developers adding configurations to only the config.xml. I did the same and it worked.

I created a method that pulls information on all the available models in the AI model service. The output of the method will be used in the administration settings page to fill in the model task properties dropdown. Right now it is a text box field and will be converted to a drop down. I was able to implement the method but I got stuck on how to make the admin page model properties textbox a drop down and connect it to the newly created method to pre fill it. I have not figured this out yet and I will clarify this with my mentor.

Moving on to the next challenge. So the task is to do model selection by using the DICOM image metadata. We need to read the information in the metadata and call the appropriate model. For example if the DICOM metadata has information on chest X ray then we call the chest x ray AI model. For this I will need to read the DICOM metadata from the Orthanc server, read the model properties for all models from the administration settings and send them to the the AI Model Service where the service will look at the metadata information, filter in the appropriate model properties and redirect the corresponding AI model endpoint.

I faced two issues here,

One, how do I read the DICOM metadata? After rummaging through the code for a while I found Utils.java page that creates a URL to pull the DICOM image from the Orthanc Server. Now I need to do also pull the metadata of the DICOM image. I started going through the Orthanc documentation to figure this out but there were a lot of terminologies I did not understand. After a while I figured out  they use an attribute "metadata" to pull the metadata information. I spent a lot of time to just figure this out. Then I went on to implement the methods.

Two, there is no common pattern in the DICOM metadata to separate out a chest image from a Mammogram image. For example, for a chest image you may need to look at the DICOM metadata attribute "BodyPartExamined" which has value "CHEST" but for Mammograph the attribute would be "Modality" with value "MG". The problem arises now, how can you without hardcoding different attributes for different modalities (chest, head, mammogram, etc) do model selection? I need to talk about this to my mentor and get it clarified.

Last I modified the existing call from the LH-RIS to the AI Model Service to include DICOM metadata information and model properties from the admin settings page. After making the changes I wanted to test if the data sent from the method to the AI model service was correct and working. I need to understand here how to create test scripts but for now I made a change in the AI model service to which the LH-RIS module pushes the data to, saved it and checked the output. This way I was able to test and correct my code. I need to talk to my mentor on efficient ways to test these things.

Finally,


Through all these challenges I was able to make progress and pushed merge requests. I could not meet with my mentor this week since he is traveling a lot recently. I know I will meet with him soon though, align and progress on my work.

Comments

Popular posts from this blog

Google Summer of Code 2023: AI Model Service Auto Selection by Modality - Final Report

GSoC Week 1

My First GSoC - LibreHealth Community Bonding Period