示例#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(SlicingPlane sliceRendObj)
        {
            if (instance != null)
            {
                GameObject.Destroy(instance);
            }

            GameObject obj = new GameObject($"EditSliceGUI");

            instance = obj.AddComponent <EditSliceGUI>();
            instance.slicingPlane = sliceRendObj;
        }