Пример #1
0
        private void OnGUI()
        {
            GUILayout.BeginVertical();


            // Show dataset import buttons
            if (GUILayout.Button("Import RAW dataset"))
            {
                RuntimeFileBrowser.ShowOpenFileDialog(OnOpenRAWDatasetResult, "DataFiles");
            }

            if (GUILayout.Button("Import PARCHG dataset"))
            {
                RuntimeFileBrowser.ShowOpenFileDialog(OnOpenPARDatasetResult, "DataFiles");
            }

            if (GUILayout.Button("Import DICOM dataset"))
            {
                RuntimeFileBrowser.ShowOpenDirectoryDialog(OnOpenDICOMDatasetResult);
            }

            // Show button for opening the dataset editor (for changing the visualisation)
            if (GameObject.FindObjectOfType <VolumeRenderedObject>() != null && GUILayout.Button("Edit imported dataset"))
            {
                EditVolumeGUI.ShowWindow(GameObject.FindObjectOfType <VolumeRenderedObject>());
            }

            // Show button for opening the slicing plane editor (for changing the orientation and position)
            if (GameObject.FindObjectOfType <SlicingPlane>() != null && GUILayout.Button("Edit slicing plane"))
            {
                EditSliceGUI.ShowWindow(GameObject.FindObjectOfType <SlicingPlane>());
            }

            GUILayout.EndVertical();
        }
Пример #2
0
        public static void ShowWindow(VolumeRenderedObject volRendObj)
        {
            if (instance != null)
            {
                GameObject.Destroy(instance);
            }

            GameObject obj = new GameObject($"EditVolumeGUI_{volRendObj.name}");

            instance = obj.AddComponent <EditVolumeGUI>();
            instance.targetObject = volRendObj;
        }