IEnumerator getHolograms()
    {
        yield return(HoloStorageClient.GetMultipleHolograms(hologramList, HologramsId));

        foreach (Hologram hologram in hologramList)
        {
            GameObject button = Instantiate(buttonTemplates) as GameObject;
            button.SetActive(true);

            string information =
                $"{(title ? $"<b>{hologram.title}</b>\n" : "")}" +
                $"{(hologramID ? $"ID: {hologram.hid}\n":"")}" +
                $"{(description ? $"Description: {hologram.description}\n" : "")}" +
                $"{(contentType ? $"Content Type: {hologram.contentType}\n" : "")}" +
                $"{(fileSizeInkb ? $"File Size: {hologram.fileSizeInKb}\n" : "")}" +
                $"{(bodySite ? $"Body Site: {hologram.bodySite}\n" : "")}" +
                $"{(dateOfImaging ? $"Date Of Imaging: {hologram.dateOfImaging.Substring(0, 10)}\n" : "")}" +
                $"{(creationDate ? $"Creation Date: {hologram.creationDate.Substring(0, 10)}\n" : "")}" +
                $"{(creationMode ? $"Creation Mode: {hologram.creationMode}\n" : "")}" +
                $"{(creationDescription ? $"Creation Description: {hologram.creationDescription}" : "")}";

            button.GetComponent <ListItem>().SetText(information);

            button.transform.SetParent(buttonTemplates.transform.parent, false);
        }
    }
Example #2
0
        public IEnumerator getAuthorTest()
        {
            Author author = new Author();

            yield return(HoloStorageClient.GetAuthor(author, "a100"));

            Assert.AreEqual(author.aid, "a100");
            Assert.AreEqual(author.name.full, "Maudie Kirlin");
        }
Example #3
0
        public IEnumerator getPatientTest()
        {
            Patient patient = new Patient();

            yield return(HoloStorageClient.GetPatient(patient, "p100"));

            Assert.AreEqual(patient.pid, "p100");
            Assert.AreEqual(patient.gender, "female");
            Assert.AreEqual(patient.birthDate, "1947-05-25");
            Assert.AreEqual(patient.name.full, "Rosario Aufderhar");
        }
    public void LoadModel()
    {
        HologramInstantiationSettings setting = new HologramInstantiationSettings
        {
            Manipulable = true,
            Rotation    = new Vector3(0, 180, 0),
            Position    = new Vector3(0.22f, -0.2f, 0.8f),
            Size        = 0.12f
        };

        HoloStorageClient.LoadHologram("ef051fa3-ccfd-4a3e-8bf6-3cd4c1c8dc23", setting);
    }
Example #5
0
    IEnumerator getAllPatients()
    {
        yield return(HoloStorageClient.GetMultiplePatients(patientList, patientIds));

        if (patientList.Count == 0)
        {
            Message.text = "There is no patients for you";
        }
        else
        {
            GenerateListView(patientList);
        }
    }
Example #6
0
        public IEnumerator getMultipleAuthorTest()
        {
            List <Author> authorList = new List <Author>();

            yield return(HoloStorageClient.GetMultipleAuthors(authorList, "a100,a101,nullAuthor"));

            Assert.AreEqual(authorList[0].aid, "a100");
            Assert.AreEqual(authorList[0].name.full, "Maudie Kirlin");

            Assert.AreEqual(authorList[1].aid, "a101");
            Assert.AreEqual(authorList[1].name.full, "Erlinda Franecki");

            //The response from server with "aid = nullAuthor" should be empty
            Assert.AreEqual(authorList.Count, 2);
        }
    IEnumerator getAllPatients()
    {
        List <Patient> patientList = new List <Patient>();

        yield return(HoloStorageClient.GetMultiplePatients(patientList, "p-101,p-102,p-103"));

        All.SetActive(true);
        foreach (Patient patient in patientList)
        {
            GameObject button = Instantiate(buttonTemplates) as GameObject;
            button.SetActive(true);
            button.GetComponent <DemoScript>().SetText(patient.name.full);
            button.transform.SetParent(buttonTemplates.transform.parent, false);
        }
    }
Example #8
0
    IEnumerator getAllHolograms(string patientID)
    {
        yield return(HoloStorageClient.GetMultipleHolograms(hologramList, patientID, QueryType.pids));

        if (hologramList.Count == 0)
        {
            Title.text   = patient.name.full;
            Message.text = "There is no Holograms for this patient";
        }
        else
        {
            GenerateListView(hologramList);
            Title.text = patient.name.full;
        }
    }
Example #9
0
    public void LoadHologram()
    {
        HologramList.sceneSwitchFlag  = true;
        HologramDisplayScene.patient  = patient;
        HologramDisplayScene.hologram = hologram;
        HologramInstantiationSettings setting = new HologramInstantiationSettings
        {
            Name      = "Loaded Model",
            Rotation  = new Vector3(0, 180, 0),
            Position  = new Vector3(0f, 0f, 2f),
            SceneName = "HologramDisplayScene",
            Size      = 0.5f
        };

        HoloStorageClient.LoadHologram(hologram.hid, setting);
    }
    IEnumerator getPatientByID()
    {
        Patient patient = new Patient();

        yield return(HoloStorageClient.GetPatient(patient, "p-101"));

        Single.SetActive(true);
        try
        {
            SinglePatientInfo.text = $"Patient name: \n{patient.name.full}\nGender: {patient.gender}\nDate of Birth: \n{patient.birthDate.Substring(0, 10)}";
        }
        catch (Exception e)
        {
            Debug.LogError("Failed to set the text! \n[Error message]" + e.Message);
        }
    }
    void Start()
    {
        HologramInstantiationSettings setting = new HologramInstantiationSettings
        {
            Name        = ModelName,
            Position    = ModelPosition,
            Rotation    = ModelRotation,
            Manipulable = true,
            Size        = ModelSize
        };

        if (SceneName != string.Empty)
        {
            setting.SceneName = SceneName;
        }

        HoloStorageClient.LoadHologram(HologramID, setting);
    }
Example #12
0
        public IEnumerator getHologramsTest()
        {
            Hologram hologram = new Hologram();

            yield return(HoloStorageClient.GetHologram(hologram, "h101"));

            Assert.AreEqual(hologram.hid, "h101");
            Assert.AreEqual(hologram.title, "Lungs Hologram");
            Assert.AreEqual(hologram.description, "Lungs of patient");
            Assert.AreEqual(hologram.contentType, "model/gltf-binary");
            Assert.AreEqual(hologram.fileSizeInKb, 1471);
            Assert.AreEqual(hologram.bodySite, "chest");
            Assert.AreEqual(hologram.dateOfImaging, "2017-07-15T15:20:25Z");
            Assert.AreEqual(hologram.creationDate, "2019-01-02T12:30:45Z");
            Assert.AreEqual(hologram.creationMode, "GENERATE_FROM_IMAGING_STUDY");
            Assert.AreEqual(hologram.creationDescription, "Demo of output generated by the lung segmentation pipeline");
            Assert.AreEqual(hologram.aid, "a101");
            Assert.AreEqual(hologram.pid, "p100");
        }
Example #13
0
        public IEnumerator getMultiplePatientTest()
        {
            List <Patient> patientList = new List <Patient>();

            yield return(HoloStorageClient.GetMultiplePatients(patientList, "p100,p101,nullPatient"));

            Assert.AreEqual(patientList[0].pid, "p100");
            Assert.AreEqual(patientList[0].gender, "female");
            Assert.AreEqual(patientList[0].birthDate, "1947-05-25");
            Assert.AreEqual(patientList[0].name.full, "Rosario Aufderhar");

            Assert.AreEqual(patientList[1].pid, "p101");
            Assert.AreEqual(patientList[1].gender, "male");
            Assert.AreEqual(patientList[1].birthDate, "1947-06-04");
            Assert.AreEqual(patientList[1].name.full, "Buster Greenholt");

            //The response with "pid = nullPatient" from server should be empty
            Assert.AreEqual(patientList.Count, 2);
        }
    IEnumerator getPatients()
    {
        yield return(HoloStorageClient.GetMultiplePatients(patientList, PatientsId));

        foreach (Patient patient in patientList)
        {
            GameObject button = Instantiate(buttonTemplates) as GameObject;
            button.SetActive(true);

            string information =
                $"{(patientName ? $"<b>{patient.name.full}</b>\n" : "")}" +
                $"{(patientID ? $"ID: {patient.pid}\n" : "")}" +
                $"{(birthDate ? $"Date of birth: {patient.birthDate.Substring(0, 10)}\n" : "")}" +
                $"{(gender ? $"Gender: {patient.gender}" : "")}";

            button.GetComponent <ListItem>().SetText(information);

            button.transform.SetParent(buttonTemplates.transform.parent, false);
        }
    }
Example #15
0
        public IEnumerator getMultipleHologramsTest()
        {
            List <Hologram> hologramList = new List <Hologram>();

            yield return(HoloStorageClient.GetMultipleHolograms(hologramList, "p100,p101,nullPatient", QueryType.pids));

            Assert.AreEqual(hologramList[0].hid, "h101");
            Assert.AreEqual(hologramList[0].title, "Lungs Hologram");
            Assert.AreEqual(hologramList[0].description, "Lungs of patient");
            Assert.AreEqual(hologramList[0].contentType, "model/gltf-binary");
            Assert.AreEqual(hologramList[0].fileSizeInKb, 1471);
            Assert.AreEqual(hologramList[0].bodySite, "chest");
            Assert.AreEqual(hologramList[0].dateOfImaging, "2017-07-15T15:20:25Z");
            Assert.AreEqual(hologramList[0].creationDate, "2019-01-02T12:30:45Z");
            Assert.AreEqual(hologramList[0].creationMode, "GENERATE_FROM_IMAGING_STUDY");
            Assert.AreEqual(hologramList[0].creationDescription, "Demo of output generated by the lung segmentation pipeline");
            Assert.AreEqual(hologramList[0].aid, "a101");
            Assert.AreEqual(hologramList[0].pid, "p100");

            Assert.AreEqual(hologramList[1].hid, "h100");

            //Totally 3 holograms data from server, (no response with "pid = nullPatient")
            Assert.AreEqual(hologramList.Count, 3);
        }