Module for Internal Dosimetry in Nuclear Medicine

Dear All

I am willing to create a whole module for Internal Dosimetry in Nuclear Medicine, the Module consist on several plugins:

  1. Quality Control of Images (Images loaded from DICOM Node must contain a minimum set of data in headers)
  2. Images are supposed to be Registered by acquisition system and they can be easily registered with the already available Registration plugins here.
  3. CT image Segmentation with Atlas (Its been proposed several models from ICRP but the Idea is to have the ability to enter the Model)
  4. CT Rescaling (not confusing with BRAINS rescaling with is useless in this way)
  5. Geant4 (preferred) or Gate Bridge to perform Dose calculations (currently missing)
  6. Tumor/Health Structures Segmentation (like the PETTumorSegmentation plugin)
  7. Pharmacokinetics per Atlas tissue if possible, otherwise per segmented organ, this leads to a matrix to move from dose rate to absorbed dose
  8. BED calculation
  9. Anything else interesting or missing in the above

Most of this is already done by other plugins available here, but everything its messed up and there are missing parts. This is a long term Project, so it will be implemented by stages. If someone is ready already working in something similar and is willing to accept the challenge just let me know.

1 Like

Hi Alex,

I’m new here but I’m really interested in something like that. I saw a course from EFOMP that will occur in the beginning of 2019.

I hope we keep in touch.

Best regards,
Tadeu

Looks like a nice, ambitious roadmap. It is great that you plan to work on these. There are many modules and extensions that can help you and if you have any specific questions or problems then let us know and we’ll be happy to help.

Hi Alex,
It’s very interessting to work under that, I would like to collaborate with you.

Best regards,

Yes, it is the ESMPE course that will be held in Prague in January 2019. I am one of the teachers :wink:

1 Like

I am preparing the ESMPE course, hopefully we will have something already developed (working) in very early stage by then. I will let you know further when it is finally released. For now I need to be focused on that, after January I will be more active developing.

Hi lassoan! I am having troubles setting properly the vtk environment to be detected by both Slicer and VSCode, the one shipped by Slicer has no sources, so it is useless but when I compile Slicer with my own VTK it does not compile at all (bunch of errors). Hopefully I will have this sorted out eventually :frowning:

Edit: I am on MacOS 10.4 Mojave, VSCode October 2018 (version 1.29)

Update:

  • Quality Control of Images (Images loaded from DICOM Node must contain a minimum set of data in headers) -> This will be addressed diferently
  • Images are supposed to be Registered by acquisition system and they can be easily registered with the already available Registration plugins here. -> This is already available in Slicer but too diluted. A working procedure will be shown in the ESMPE course
  • CT image Segmentation with Atlas (Its been proposed several models from ICRP but the Idea is to have the ability to enter the Model) -> Not currently available, we stick with RTstruct importation and / or manual segmentation
  • CT Rescaling (not confusing with BRAINS rescaling with is useless in this way) -> I realize that I can work with transform matrixes directly instead of modifying the images which was a bad idea
  • Geant4 (preferred) or Gate Bridge to perform Dose calculations (currently missing) -> I already have the goal template for Gate but I need some handler to fill it. The idea of Geant4 is still there but is a lot more difficult path
  • Tumor/Health Structures Segmentation (like the PETTumorSegmentation plugin) -> I realize that with the combination of PETTumorSegmentation and the rest of segmentation tools this can be achieved, just require a written procedure
  • Pharmacokinetics per Atlas tissue if possible, otherwise per segmented organ, this leads to a matrix to move from dose rate to absorbed dose -> This is NOT available in SLICER, not even as extension, a module is required!! Basically a module that creates a table with different time points and allows to do a time integral. I am doing this by hand in FIJI.
  • BED calculation -> I am doing this by hand in FIJI. But theoretical is possible in Slicer, just need an external matrix(table) with BED coefficients per structure.
  • Anything else interesting or missing in the above -> I really need to understand better how to handle multiple time points SPECT/CT studies, so if anyone has some hint they are greatly appreciated

I don’t know what you mean by this. Normally, you let Slicer build all of its dependencies, including VTK.

You’ve posted a lot of questions/ideas. It is more likely that you get feedback if you post one (or maximum a few questions) at a time, about those topics that you are currently working on, preferably in a new topic. You may reference this topic from the new topics to give some background about what you would like to achieve.

If you let Slicer do this, using the VTK from the system it will crash (at least on my system). I only made it to work with the bundled VTK setup is has, but in this case VSCode does not see the VTK as valid package but the system VTK which is not compatible with Slicer’s one. I have to figure out how to solve this.

Have you set PythonSlicer as Python interpreter in your Python IDE?

At the end I might surrender and do a python module after all, CLI is really not setting up. But as I can see there is another conflict, PythonSlicer is 2.7 and refers to VTK6, while in my system there is python 3.7.1 and VTK9. If I try to compile Slicer with my setup it just gives a bunch of errors.

Edit: I successfully installed the jupyter kernel, maybe this is the way to go! everything runs fine there!!

If you can describe specific problems then we can help solving them or explain what are some common alternative approaches.

If you want to learn about how to implement Python scripted modules for Slicer, I would recommend completing programming tutorials, in particular the “Slicer programming tutorial” and the PerkLab’s “Scripting and module development tutorial”.

Slicer uses Python 2.7 and latest VTK (VTK 8.2). Various VTK versions are available in other Python distributions. You can certainly not mix different versions, so if you want to call a Python3 script from Slicer then you need to use the startup environment as described here.

1 Like

I’ll attend Alex. See you there

This is a little piece of code that lets you to install any missing package from within the python interpreter itself, just create a file named slicer_python_package_installer.py inside SlicerPlugins folder in your home folder (create if not exists and add it to modules paths). Then add the following

# import pip main
try:
    from pip import main as pipmain
except:
    from pip._internal import main as pipmain
import importlib

def install_and_import(package):
    try:   
        importlib.import_module(package)
    except:
        pipmain(['install', package])
        importlib.import_module(package)
        pass

def install_package(package):
    try:
        importlib.import_module(package)
    except:
        pipmain(['install', package])
        pass

Then in the python interpreter write the following:

from slicer_python_package_installer import *

And voila! you can easily do

install_and_import('joblib')

image

1 Like

Hi Alex!
How is your project coming along? Is there already something usable or a documentation about what you have already achieved?
Best regards
Felix

Hello, sorry for late response, I was hospitalised for two weeks!

You have to search for OpenDose3D extension in extension manager. Also you can review the code and user manuals here OpenDose / SlicerOpenDose3D · GitLab

If you have any further question just let me know