コード例 #1
0
        private void AfterAnonymize(StudyData studyPrototype, SeriesData seriesPrototype)
        {
            _anonymizedUidData    = new UidData();
            _anonymizedStudyData  = new StudyData();
            _anonymizedSeriesData = new SeriesData();
            _anonymizedDateData   = new DateData();

            _file.DataSet.LoadDicomFields(_anonymizedUidData);
            _file.DataSet.LoadDicomFields(_anonymizedStudyData);
            _file.DataSet.LoadDicomFields(_anonymizedSeriesData);
            _file.DataSet.LoadDicomFields(_anonymizedDateData);

            ValidateRemovedTags(_file.DataSet);
            ValidateNulledAttributes(_file.DataSet);
            ValidateRemappedUids(_originalUidData, _anonymizedUidData);

            Assert.AreEqual(_anonymizedStudyData.PatientId, studyPrototype.PatientId);
            Assert.AreEqual(_anonymizedStudyData.PatientsNameRaw, studyPrototype.PatientsNameRaw);
            Assert.AreEqual(_anonymizedStudyData.PatientsBirthDateRaw, studyPrototype.PatientsBirthDateRaw);
            Assert.AreEqual(_anonymizedStudyData.PatientsSex, studyPrototype.PatientsSex);
            Assert.AreEqual(_anonymizedStudyData.AccessionNumber, studyPrototype.AccessionNumber);
            Assert.AreEqual(_anonymizedStudyData.StudyDateRaw, studyPrototype.StudyDateRaw);
            Assert.AreEqual(_anonymizedStudyData.StudyDescription, studyPrototype.StudyDescription);
            Assert.AreEqual(_anonymizedStudyData.StudyId, studyPrototype.StudyId);

            Assert.AreEqual(_anonymizedSeriesData.SeriesDescription, seriesPrototype.SeriesDescription);
            Assert.AreEqual(_anonymizedSeriesData.ProtocolName, seriesPrototype.ProtocolName);
            Assert.AreEqual(_anonymizedSeriesData.SeriesNumber, seriesPrototype.SeriesNumber);
        }
コード例 #2
0
        private static void ValidateNullDates(DateData anonymizedDateData)
        {
            Assert.AreEqual(anonymizedDateData.InstanceCreationDate, "");
            Assert.AreEqual(anonymizedDateData.AcquisitionDatetime, "");
            Assert.AreEqual(anonymizedDateData.ContentDate, "");
            Assert.AreEqual(anonymizedDateData.SeriesDate, "");

            Trace.WriteLine("Validated Nulled Dates.");
        }
コード例 #3
0
        private void Initialize()
        {
            _file = CreateTestFile();

            _originalUidData   = new UidData();
            _originaStudyData  = new StudyData();
            _originaSeriesData = new SeriesData();
            _originalDateData  = new DateData();

            _file.DataSet.LoadDicomFields(_originalUidData);
            _file.DataSet.LoadDicomFields(_originaStudyData);
            _file.DataSet.LoadDicomFields(_originaSeriesData);
            _file.DataSet.LoadDicomFields(_originalDateData);
        }
コード例 #4
0
		private static void ValidateNullDates(DateData anonymizedDateData)
		{
			Assert.AreEqual(anonymizedDateData.InstanceCreationDate, "");
			Assert.AreEqual(anonymizedDateData.AcquisitionDatetime, "");
			Assert.AreEqual(anonymizedDateData.ContentDate, "");
			Assert.AreEqual(anonymizedDateData.SeriesDate, "");

			Trace.WriteLine("Validated Nulled Dates.");
		}
コード例 #5
0
		private void AfterAnonymize(StudyData studyPrototype, SeriesData seriesPrototype)
		{
			_anonymizedUidData = new UidData();
			_anonymizedStudyData = new StudyData();
			_anonymizedSeriesData = new SeriesData();
			_anonymizedDateData = new DateData();

			_file.DataSet.LoadDicomFields(_anonymizedUidData);
			_file.DataSet.LoadDicomFields(_anonymizedStudyData);
			_file.DataSet.LoadDicomFields(_anonymizedSeriesData);
			_file.DataSet.LoadDicomFields(_anonymizedDateData);

			ValidateRemovedTags(_file.DataSet);
			ValidateNulledAttributes(_file.DataSet);
			ValidateRemappedUids(_originalUidData, _anonymizedUidData);

			Assert.AreEqual(_anonymizedStudyData.PatientId, studyPrototype.PatientId);
			Assert.AreEqual(_anonymizedStudyData.PatientsNameRaw, studyPrototype.PatientsNameRaw);
			Assert.AreEqual(_anonymizedStudyData.PatientsBirthDateRaw, studyPrototype.PatientsBirthDateRaw);
			Assert.AreEqual(_anonymizedStudyData.PatientsSex, studyPrototype.PatientsSex);
			Assert.AreEqual(_anonymizedStudyData.AccessionNumber, studyPrototype.AccessionNumber);
			Assert.AreEqual(_anonymizedStudyData.StudyDateRaw, studyPrototype.StudyDateRaw);
			Assert.AreEqual(_anonymizedStudyData.StudyDescription, studyPrototype.StudyDescription);
			Assert.AreEqual(_anonymizedStudyData.StudyId, studyPrototype.StudyId);

			Assert.AreEqual(_anonymizedSeriesData.SeriesDescription, seriesPrototype.SeriesDescription);
			Assert.AreEqual(_anonymizedSeriesData.ProtocolName, seriesPrototype.ProtocolName);
			Assert.AreEqual(_anonymizedSeriesData.SeriesNumber, seriesPrototype.SeriesNumber);
		}
コード例 #6
0
		private void Initialize()
		{
			_file = CreateTestFile();
			
			_originalUidData = new UidData();
			_originaStudyData = new StudyData();
			_originaSeriesData = new SeriesData();
			_originalDateData = new DateData();

			_file.DataSet.LoadDicomFields(_originalUidData);
			_file.DataSet.LoadDicomFields(_originaStudyData);
			_file.DataSet.LoadDicomFields(_originaSeriesData);
			_file.DataSet.LoadDicomFields(_originalDateData);
		}