LEADTOOLS Medical Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.22
Creating a 3D Object Topic

The Leadtools.Medical3D.Medical3DObject is a class that is used to hold the properties and methods of the 3D object as well as the images (slices) that will make up the 3D object.

In order to create a 3D object, you must:

  1. Create an instance of this class (Medical3DObject) and
  2. Add the created instance to the Leadtools.Medical3D.Medical3DContainerLeadtools.Medical3D.Medical3DContainer.Objects collection.
  3. Fill the Medical3DObject class with image slices either through the Medical3DObject.Image property or the Medical3DObject.SetImage method, or through the memory efficient load method (recommended) which is explained below.
  4. Once the slices are added, you can then render the object using the Medical3DContainer.Render method.

Filling the 3D object with image (slices)

There are multiple ways to add the images to the 3D object, each having its own advantages.

  1. Call Medical3DObject.MemoryEfficentInit: This will create an empty 3D object which will receive all of the loaded frames.
  2. Add each individual image frame using MemoryEfficientSetFrame by passing the frame along with the index of the frame (to indicate where to place it in the 3D object). Keep in mind that you will need to free each frame after each MemoryEfficientSetFrame call, in order to release the memory used by the original image frame.
    There are four overloads for MemoryEfficientSetFrame. They specify the method that will be used to sort the images in order to build the 3D object correctly. Users can sort the images based on their image position, capture time, instance number; or keep them unsorted.
  3. Call Medical3DObject.MemoryEfficientEnd to wrap up the 3D object creation.