public static string getStoragePath(QueryObject downloadedFile) { string folderStoragePath = getFolderStoragePath(downloadedFile); Directory.CreateDirectory(folderStoragePath); string fileStoragePath = folderStoragePath + "/" + downloadedFile.GetField("InstanceNumber") + ".dcm"; return(fileStoragePath); }
// 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)); }
public static string getFolderStoragePath(QueryObject downloadedFile) { string folderStoragePath = Constants.database + "files/" + downloadedFile.GetField("PatientName") + "/" + downloadedFile.GetField("StudyDescription") + "/" + downloadedFile.GetField("SeriesDescription") + "/"; return(folderStoragePath); }