Esempio n. 1
0
        public static string getStoragePath(QueryObject downloadedFile)
        {
            string folderStoragePath = getFolderStoragePath(downloadedFile);

            Directory.CreateDirectory(folderStoragePath);

            string fileStoragePath = folderStoragePath + "/" + downloadedFile.GetField("InstanceNumber") + ".dcm";

            return(fileStoragePath);
        }
Esempio n. 2
0
        // wrapper for Dicom Toolkit services
        string[] queryString(QueryObject queryData, string dir)
        {
            string query = "";

            foreach (string dicomTag in queryData.getKeys())
            {
                query = " -k " + dicomTag + "=\"" + queryData.GetField(dicomTag) + "\" " + query;
            }

            if (dir != "")
            {
                DirectoryInfo di = Directory.CreateDirectory(dir);
                foreach (FileInfo file in di.GetFiles())
                {
                    file.Delete();
                }
            }

            return(specificQuery(query, dir));
        }
Esempio n. 3
0
        public static string getFolderStoragePath(QueryObject downloadedFile)
        {
            string folderStoragePath = Constants.database + "files/" + downloadedFile.GetField("PatientName") + "/" + downloadedFile.GetField("StudyDescription") + "/" + downloadedFile.GetField("SeriesDescription") + "/";

            return(folderStoragePath);
        }