Skip to content

A Unity scene setup that generates a 3D Texture from a series of CT scans and turn it into a volume of particles

License

Notifications You must be signed in to change notification settings

unitycoder/CTScanVisualiser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CTScanVisualiser

CTScanVisualiser is a Unity package that generates a 3D Texture from a series of CT scans and turns it into a volume of particles using VFX Graph. Notes:

  • Tested with Unity 2021 LTS HDRP.
  • The sample CT scan images are from a DICOM dataset provided freely by Medimodel for education and research, if you find them useful please share their page (https://medimodel.com/sample-dicom-files/).

CTScanVisualiser

Instructions

  • Import the Unity package inside a project.

Once imported open the scene named "CT" to explore its contents. The hiearchy should have the following gameobjects:

  • Texture3DGenerator - if you hit play it generates a 3D texture under the Assets folder using the MRI images inside the DICOM_PNGs_256 folder.
  • Texture3D_VFXGraph - this gameobject relies on VFX graph to generate a volume of particles which colours are sampled from a 3D texture.
  • Texture3D_Shader - this gameobject uses a shader (copied directly from the 3D Texture Unity documentation) to render it.

When used in combination with the Unity Virtual Camera app, you can use a compatible iOS device to "slice" through the volume of particles by moving the device.

Notes:

  • Source images must all be of the same size when generating a 3D Texture.
  • Tested with 88 256x256 images on a gaming laptop equipped with an NVIDIA RTX 3080 graphics card.
  • The memory impact of 3D Texture increses rapidly based on the image resolution.
  • Increasing the image resolution can drastically affect performance when rendering the volume of particles (VFX Graph).
  • Use the 3D Texture alone instead of the volume of particles (VFX Graph) for better performance.
  • "Out-of-the-box" the included 3D Texture shader won't allow "slicing" the volume.
  • Check the documentation about 3D Textures at https://docs.unity3d.com/Manual/class-Texture3D.html.

About

A Unity scene setup that generates a 3D Texture from a series of CT scans and turn it into a volume of particles

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published