private void newDicom() { DicomImage image = new DicomImage(); image.Import("ROOT\\0001\\0001\\Dicom\\koala.jpg"); image.Name = "Koala"; image.PatientID = "0001"; image.DateOfBirth = DateTime.Now; image.Sex = "M"; //Add General Study Module image.StudyUID = DicomGlobal.NewUID(); image.DataSet.Add(0x008, 0x0020, DateTime.Now); image.DataSet.Add(0x008, 0x0030, DateTime.Now); image.DataSet.Add(0x008, 0x0090, "foo"); //referring physicians name image.DataSet.Add(0x0020, 0x0010, "1"); //study ID image.AccessionNumber = "1"; //Add General Series Module image.DataSet.Add(0x008, 0x0060, "OTnuovo");//Modality image.SeriesUID = DicomGlobal.NewUID(); image.DataSet.Add(0x0020, 0x0011, ""); //Add SC Equipment Module image.DataSet.Add(0x008, 0x0064, "SI"); //Add General Image Module image.DataSet.Add(0x0020, 0x0013, ""); image.DataSet.Add(0x0020, 0x0020, ""); //Add SOP Common Module image.DataSet.Add(0x008, 0x0016, DicomObjects.DicomUIDs.SOPClasses.SecondaryCapture); image.DataSet.Add(0x008, 0x0018, DicomGlobal.NewUID()); image.Write(path + "\\00010001Added", "1.2.840.10008.1.2.1"); }
private void newDicom(string newName, string sourceImage, string destDicom) { DicomImage image = new DicomImage(); image.Import(sourceImage); image.Name = newName; //image.PatientID = "0001"; //image.DateOfBirth = DateTime.Now; //image.Sex = "M"; //Add General Study Module //image.StudyUID = DicomGlobal.NewUID(); //image.DataSet.Add(0x008, 0x0020, DateTime.Now); //image.DataSet.Add(0x008, 0x0030, DateTime.Now); //image.DataSet.Add(0x008, 0x0090, "foo");//referring physicians name //image.DataSet.Add(0x0020, 0x0010, "1");//study ID //image.AccessionNumber = "1"; //Add General Series Module //image.DataSet.Add(0x008, 0x0060, "OTnuovo");//Modality //image.SeriesUID = DicomGlobal.NewUID(); //image.DataSet.Add(0x0020, 0x0011, ""); //Add SC Equipment Module //image.DataSet.Add(0x008, 0x0064, "SI"); //Add General Image Module //image.DataSet.Add(0x0020, 0x0013, ""); //image.DataSet.Add(0x0020, 0x0020, ""); //Add SOP Common Module //image.DataSet.Add(0x008, 0x0016, DicomObjects.DicomUIDs.SOPClasses.SecondaryCapture); image.DataSet.Add(0x008, 0x0018, DicomGlobal.NewUID()); image.Write(destDicom, "1.2.840.10008.1.2.1"); }