Giter Club home page Giter Club logo

ctscanvisualiser's Introduction

CTScanVisualiser

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

  • Tested with Unity 2021 LTS HDRP on a gaming laptop equipped with an NVIDIA RTX 3080 graphics card.
  • 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 - When active and after hitting Play, this gameobject has a script attached (Scripts/TextureArrayGenerator) that generates a 3D texture in the root of the Assets folder using images from a source folder which name can be specified in the Inspector as well as image resolution and total count.

image

  • Texture3D_VFXGraph - This gameobject relies on a VFX asset (VFX/VolumetricCT) to generate a volume of particles which colours are sampled from the 3D texture generated in the previous step. You can link a newly generated 3D Texture in the Properties section of the Inspector window.

image

  • Texture3D_Shader - As an alternative to using a particle system (VFX Graph), this gameobject uses a shader (Shaders/VoumeShader) to render the 3D texture in the scene. The shader is a direct copy of the sample script found in the Unity documentation at https://docs.unity3d.com/Manual/class-Texture3D.html.

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.

ctscanvisualiser's People

Contributors

royroden avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.