TBRaymarchPlugin - Volume Rendering (Raymarching) Plugin for Unreal Engine

Heya Alejandro, glad to see that this might be useful to people :slight_smile:

I should actually refactor the plugin, so that it’s not tied to MHD as much, it’s gonna be a simple inheritance structure, so you can just extend the asset for loading any kind of medical data.

But for now, if you can get the info that is needed in the MHDAsset from the DICOM series, create a new MHDAsset and just set the members with whatever you read from the DICOm, it will work just fine.

I think the cleanest solution for the DICOM loading is making a standalone ITK plugin (just a plugin wrapping a built ITK library with some convenience functions) and then using that to load the tags and binary data from my plugins. This would have the added benefit of not marrying the DICOM loading part to the rest of the raymarcher plugin, so people could use that for other stuff.

The only main challenge I had when reading the DICOM series myself straight in C++ was getting the 3rd party library built as .dll or .lib packaged into a plugin and forcing UE to load it and be usable from other plugins, I remember that being a pain.

Once I had that, the parser itself wasn’t too hard, as ITK or Imebra SDKs can read the DICOM tags/data pretty easily.

It’s been a year since I was making the DICOM loader, so I don’t remember why, but in the end I went with building a static library + headers instead of a .dll, which still feels like a hacky solution, but was a lot simpler.

I’d recommend ITK, as Imebra has pretty restrictive licensing (doesn’t really matter as long as this is non-commercial, but you never know).

If you run into a wall with the .dll wrapping plugin, I can give you more info on how to do it with the static .lib solution.

Some sample code using ITK to parse :

https://github.com/InsightSoftwareCo…ImageWrite.cxx

I haven’t actually used pydicom myself, I just recently came across a master’s thesis where the guy was doing something very similar to my plugin and loading the data with pydicom. The downside there is that it will only work in-editor, unless you use the 3rd party python-during-runtime plugin (default Epic’s python in UE only works in-editor).

Cheers, .