Exemple #1
0
        public void ReadDicomMetaData_all_except_pixel_data()
        {
            //Act
            var file = new dicom.FileParser().ParseMetadata(testFile1);

            //Assert
            uint tagId = 0x00401001;

            Assert.AreEqual("A10026177757", file.Attributes[tagId].Value.ToString(), $"Unexpected value for tag {tagId}.");
        }
Exemple #2
0
        public void ReadDicomMetaData_until_tag_00020002()
        {
            //Act
            var file = new dicom.FileParser().Parse(testFile1, 0x00020002);

            //Assert
            var tag = TagsDictionary.PatientID;

            Assert.AreEqual("1.2.840.10008.5.1.4.1.1.2", file.Attributes[0x00020002].Value.ToString(), $"Unexpected value for tag {tag}.");
        }
Exemple #3
0
        public void ReadDicomMetaData_PatientsName()
        {
            //Act
            var file = new dicom.FileParser().Parse(testFile1, TagsDictionary.PatientsName.ID);

            //Assert
            var tag = TagsDictionary.PatientsName;

            Assert.AreEqual("Anonymized", file.Attributes[tag.ID].Value.ToString(), $"Unexpected value for tag {tag}.");
        }
Exemple #4
0
        public void ReadDicomMetaData_FileMetaInformationGroupLength()
        {
            //Act
            var file = new dicom.FileParser().Parse(testFile1, TagsDictionary.FileMetaInformationGroupLength.ID);

            //Assert
            var tag = TagsDictionary.FileMetaInformationGroupLength;

            Assert.AreEqual((uint)230, file.Attributes[tag.ID].Value, $"Unexpected value for tag {tag}.");
        }