Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing Dataset not working in Meta Quest 3 but working when running the app in unity #237

Open
alykhaled opened this issue Mar 25, 2024 · 1 comment

Comments

@alykhaled
Copy link

alykhaled commented Mar 25, 2024

Importing Dataset not working in Meta Quest 3 but working when running the app in unity
This is the code I am using

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityVolumeRendering;

public class PlaneDicom : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        string dir = "Assets/VisMale.raw";
        // Get all files in DICOM directory
        // add variable for the format to be uint8
        
        Debug.Log("Importing dataset from " + dir);
        // Create the importer
        RawDatasetImporter importer = new RawDatasetImporter(dir, 128, 256, 256, DataContentFormat.Uint8, Endianness.LittleEndian, 0);
        // Import the dataset
        VolumeDataset dataset = importer.Import();
        Debug.Log("Dataset imported");
        Debug.Log("Dataset size: " + dataset.dimX + "x" + dataset.dimY + "x" + dataset.dimZ);
        // Spawn the object
        VolumeRenderedObject obj = VolumeObjectFactory.CreateObject(dataset);
        obj.transform.position = new Vector3(0, 1.0f, 2.26f);
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
@mlavik1
Copy link
Owner

mlavik1 commented Mar 25, 2024

Hi, you won't be able to load from the "Assets" directory directly in builds. You'll probably want to put it somewhere else, for example under "StreamingAssets": https://docs.unity3d.com/Manual/StreamingAssets.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants