Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Quick3D custom geometry from 3D array
Forum Updated to NodeBB v4.3 + New Features

Qt Quick3D custom geometry from 3D array

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 186 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    Uro1012
    wrote on 30 Apr 2021, 09:33 last edited by
    #1

    Hello there,
    I have some segmented medical image in DICOM format that I would like to display with Quick3D. I read those images with ITK and there is a image to mesh filter which I should be able to use. My question is how do I create a 3D object from this mesh? I found the custom geometry example, but don't really understand it as I have a limited knowledge about 3D graphics. Any help would be very welcome.

    I already have a QML file that can display a 3D image from a mesh file.

    import QtQuick 2.0
    import QtQuick.Controls 2.12
    import QtQuick.Layouts 1.2
    import QtQuick3D 1.15
    import QtQuick3D.Helpers 1.0
    
    Item {
        id: displayImage
        width: 1200
        height: 800
    
        Rectangle {
            width: parent.width
            height: parent.height
    
            Rectangle {
                height: parent.height-60
                width: parent.width
                anchors.top: parent.top
    
                // content
                View3D {
                    id: view
                    anchors.fill: parent
    
                    PerspectiveCamera {
                        id: camera
                        position: Qt.vector3d(0, 0, 0)
                        pivot: Qt.vector3d(0, 0, -300)
                    }
    
                    DirectionalLight {
                        id: light
                        eulerRotation.x: camera.eulerRotation.x
                        eulerRotation.y: camera.eulerRotation.y
                        eulerRotation.z: camera.eulerRotation.z
                    }
    
                    Model {
                        id: bone
                        position: Qt.vector3d(-512/2*0.57, -512/2*0.57, -129/2*1.6) // center of image
                        source: "file:///C:/.../bone.mesh"
    
                        materials:
                            DefaultMaterial {
                            diffuseColor: "grey"
                        }
                    }
    
                WasdController {
                    controlledObject: camera
                }
            }
    
            Footer {
                anchors.bottom: parent.bottom
    
                previous: loadImg
            }
        }
    }
    
    
    1 Reply Last reply
    0

    1/1

    30 Apr 2021, 09:33

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved