public KeyObjectSelectionDocumentIod(IDicomAttributeProvider dicomAttributeProvider)
 {
     _dicomAttributeProvider        = dicomAttributeProvider;
     _patientModule                 = new PatientModuleIod(_dicomAttributeProvider);
     _specimenIdentificationModule  = new SpecimenIdentificationModuleIod(_dicomAttributeProvider);
     _clinicalTrialSubjectModule    = new ClinicalTrialSubjectModuleIod(_dicomAttributeProvider);
     _generalStudyModule            = new GeneralStudyModuleIod(_dicomAttributeProvider);
     _patientStudyModule            = new PatientStudyModuleIod(_dicomAttributeProvider);
     _clinicalTrialStudyModule      = new ClinicalTrialStudyModuleIod(_dicomAttributeProvider);
     _keyObjectDocumentSeriesModule = new KeyObjectDocumentSeriesModuleIod(_dicomAttributeProvider);
     _clinicalTrialSeriesModule     = new ClinicalTrialSeriesModuleIod(_dicomAttributeProvider);
     _generalEquipmentModule        = new GeneralEquipmentModuleIod(_dicomAttributeProvider);
     _keyObjectDocumentModule       = new KeyObjectDocumentModuleIod(_dicomAttributeProvider);
     _srDocumentContentModule       = new SrDocumentContentModuleIod(_dicomAttributeProvider);
     _sopCommonModule               = new SopCommonModuleIod(_dicomAttributeProvider);
 }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="EncapsulatedPdfIod"/> class.
        /// </summary>
        /// <param name="dicomElementProvider">The DICOM attribute provider.</param>
        public EncapsulatedPdfIod(IDicomElementProvider dicomElementProvider)
        {
            _dicomElementProvider = dicomElementProvider;

            _patientModule = new PatientModuleIod(_dicomElementProvider);
            _clinicalTrialSubjectModule       = new ClinicalTrialSubjectModuleIod(_dicomElementProvider);
            _generalStudyModule               = new GeneralStudyModuleIod(_dicomElementProvider);
            _patientStudyModule               = new PatientStudyModuleIod(_dicomElementProvider);
            _clinicalTrialStudyModule         = new ClinicalTrialStudyModuleIod(_dicomElementProvider);
            _encapsulatedDocumentSeriesModule = new EncapsulatedDocumentSeriesModuleIod(_dicomElementProvider);
            _clinicalTrialSeriesModule        = new ClinicalTrialSeriesModuleIod(_dicomElementProvider);
            _generalEquipmentModule           = new GeneralEquipmentModuleIod(_dicomElementProvider);
            _scEquipmentModule          = new ScEquipmentModuleIod(_dicomElementProvider);
            _encapsulatedDocumentModule = new EncapsulatedDocumentModuleIod(_dicomElementProvider);
            _sopCommonModule            = new SopCommonModuleIod(_dicomElementProvider);
        }
		public void TestGeneralSeriesModuleIod()
		{
			var dicomFile = new DicomFile();

			var module = new GeneralSeriesModuleIod(dicomFile.DataSet);
			Assert.AreEqual(module.AnatomicalOrientationType, AnatomicalOrientationType.None);

			module.AnatomicalOrientationType = AnatomicalOrientationType.Quadruped;
			Assert.AreEqual(module.AnatomicalOrientationType, AnatomicalOrientationType.Quadruped);

			dicomFile.Save("TestGeneralSeriesModuleIod.dcm");

			var reloadedDicomFile = new DicomFile("TestGeneralSeriesModuleIod.dcm");
			reloadedDicomFile.Load();

			var realoadedModule = new PatientModuleIod(reloadedDicomFile.DataSet);
			Assert.AreEqual(module.AnatomicalOrientationType, AnatomicalOrientationType.Quadruped);
		}
예제 #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ScImageIod"/> class.
        /// </summary>
        /// <param name="dicomAttributeProvider">The DICOM attribute provider.</param>
        public ScImageIod(IDicomAttributeProvider dicomAttributeProvider)
        {
            _dicomAttributeProvider = dicomAttributeProvider;

            _patientModule = new PatientModuleIod(_dicomAttributeProvider);
            _clinicalTrialSubjectModule = new ClinicalTrialSubjectModuleIod(_dicomAttributeProvider);
            _generalStudyModule         = new GeneralStudyModuleIod(_dicomAttributeProvider);
            _patientStudyModule         = new PatientStudyModuleIod(_dicomAttributeProvider);
            _clinicalTrialStudyModule   = new ClinicalTrialStudyModuleIod(_dicomAttributeProvider);
            _generalSeriesModule        = new GeneralSeriesModuleIod(_dicomAttributeProvider);
            _clinicalTrialSeriesModule  = new ClinicalTrialSeriesModuleIod(_dicomAttributeProvider);
            _generalEquipmentModule     = new GeneralEquipmentModuleIod(_dicomAttributeProvider);
            _scEquipmentModule          = new ScEquipmentModuleIod(_dicomAttributeProvider);
            _generalImageModule         = new GeneralImageModuleIod(_dicomAttributeProvider);
            _imagePixelModule           = new ImagePixelMacroIod(_dicomAttributeProvider);
            _deviceModule       = new DeviceModuleIod(_dicomAttributeProvider);
            _scImageModule      = new ScImageModuleIod(_dicomAttributeProvider);
            _overlayPlaneModule = new OverlayPlaneModuleIod(_dicomAttributeProvider);
            _modalityLutModule  = new ModalityLutModuleIod(_dicomAttributeProvider);
            _voiLutModule       = new VoiLutModuleIod(_dicomAttributeProvider);
            _iccProfileModule   = new IccProfileModuleIod(_dicomAttributeProvider);
            _sopCommonModule    = new SopCommonModuleIod(_dicomAttributeProvider);
        }
예제 #5
0
 public SegmentationDocumentIod(IDicomAttributeProvider dicomAttributeProvider)
 {
     _dicomAttributeProvider     = dicomAttributeProvider;
     _patientModule              = new PatientModuleIod(_dicomAttributeProvider);
     _clinicalTrialSubjectModule = new ClinicalTrialSubjectModuleIod(_dicomAttributeProvider);
     _generalStudyModule         = new GeneralStudyModuleIod(_dicomAttributeProvider);
     _patientStudyModule         = new PatientStudyModuleIod(_dicomAttributeProvider);
     _clinicalTrialStudyModule   = new ClinicalTrialStudyModuleIod(_dicomAttributeProvider);
     _generalSeriesModule        = new GeneralSeriesModuleIod(_dicomAttributeProvider);
     _segmentationSeriesModule   = new SegmentationSeriesModuleIod(_dicomAttributeProvider);
     _clinicalTrialSeriesModule  = new ClinicalTrialSeriesModuleIod(_dicomAttributeProvider);
     _frameOfReferenceModule     = new FrameOfReferenceModuleIod(_dicomAttributeProvider);
     _generalEquipmentModule     = new GeneralEquipmentModuleIod(_dicomAttributeProvider);
     //_enhanceGeneralEquipmentModule = new EnhanceGeneralEquipmentModuleIod(_dicomAttributeProvider);
     _generalImageModule               = new GeneralImageModuleIod(_dicomAttributeProvider);
     _imagePixelModule                 = new ImagePixelMacroIod(_dicomAttributeProvider);
     _segmentationImageModule          = new SegmentationImageModuleIod(_dicomAttributeProvider);
     _multiFrameFunctionalGroupsModule = new MultiFrameFunctionalGroupsModuleIod(_dicomAttributeProvider);
     _multiFrameDimensionModule        = new MultiFrameDimensionModuleIod(_dicomAttributeProvider);
     _specimenModule = new SpecimenModuleIod(_dicomAttributeProvider);
     _commonInstanceReferenceModule = new CommonInstanceReferenceModuleIod(_dicomAttributeProvider);
     _sopCommonModule       = new SopCommonModuleIod(_dicomAttributeProvider);
     _frameExtractionModule = new FrameExtractionModuleIod(_dicomAttributeProvider);
 }
예제 #6
0
        public void TestPatientModuleIod()
        {
            var dicomFile = new DicomFile();

            var module = new PatientModuleIod(dicomFile.DataSet);

            module.ResponsibleOrganization    = "Walt Disney";
            module.ResponsiblePerson          = "Roger Radcliffe";
            module.ResponsiblePersonRole      = ResponsiblePersonRole.Owner;
            module.PatientSpeciesDescription  = "Canine species";
            module.PatientSpeciesCodeSequence = SpeciesContextGroup.CanineSpecies;
            module.PatientBreedDescription    = "Dalmatian dog";
            module.PatientBreedCodeSequence   = new[] { BreedContextGroup.DalmatianDog };
            module.BreedRegistrationSequence  = new[]
            {
                new BreedRegistrationSequence
                {
                    BreedRegistrationNumber   = "101",
                    BreedRegistryCodeSequence = new BreedRegistry(
                        "WD",
                        "101",
                        "WALT_DISNESY_101",
                        "One hundred and one dalmatians")
                }
            };

            Assert.AreEqual(module.ResponsibleOrganization, "Walt Disney");
            Assert.AreEqual(module.ResponsiblePerson, "Roger Radcliffe");
            Assert.AreEqual(module.ResponsiblePersonRole, ResponsiblePersonRole.Owner);
            Assert.AreEqual(module.PatientSpeciesDescription, "Canine species");
            Assert.AreEqual(module.PatientSpeciesCodeSequence, SpeciesContextGroup.CanineSpecies);
            Assert.AreEqual(module.PatientBreedDescription, "Dalmatian dog");
            Assert.AreEqual(module.PatientBreedCodeSequence.Length, 1);
            Assert.AreEqual(module.PatientBreedCodeSequence[0], BreedContextGroup.DalmatianDog);
            Assert.AreEqual(module.BreedRegistrationSequence.Length, 1);
            Assert.AreEqual(module.BreedRegistrationSequence[0].BreedRegistrationNumber, "101");
            Assert.AreEqual(module.BreedRegistrationSequence[0].BreedRegistryCodeSequence.CodingSchemeDesignator, "WD");
            Assert.AreEqual(module.BreedRegistrationSequence[0].BreedRegistryCodeSequence.CodingSchemeVersion, "101");
            Assert.AreEqual(module.BreedRegistrationSequence[0].BreedRegistryCodeSequence.CodeValue, "WALT_DISNESY_101");
            Assert.AreEqual(module.BreedRegistrationSequence[0].BreedRegistryCodeSequence.CodeMeaning, "One hundred and one dalmatians");

            dicomFile.Save("TestPatientModuleIod.dcm");

            var reloadedDicomFile = new DicomFile("TestPatientModuleIod.dcm");

            reloadedDicomFile.Load();

            var realoadedModule = new PatientModuleIod(reloadedDicomFile.DataSet);

            Assert.AreEqual(realoadedModule.ResponsibleOrganization, "Walt Disney");
            Assert.AreEqual(realoadedModule.ResponsiblePerson, "Roger Radcliffe");
            Assert.AreEqual(realoadedModule.ResponsiblePersonRole, ResponsiblePersonRole.Owner);
            Assert.AreEqual(realoadedModule.PatientSpeciesDescription, "Canine species");
            Assert.AreEqual(realoadedModule.PatientSpeciesCodeSequence, SpeciesContextGroup.CanineSpecies);
            Assert.AreEqual(realoadedModule.PatientBreedDescription, "Dalmatian dog");
            Assert.AreEqual(realoadedModule.PatientBreedCodeSequence.Length, 1);
            Assert.AreEqual(realoadedModule.PatientBreedCodeSequence[0], BreedContextGroup.DalmatianDog);
            Assert.AreEqual(realoadedModule.BreedRegistrationSequence.Length, 1);
            Assert.AreEqual(realoadedModule.BreedRegistrationSequence[0].BreedRegistrationNumber, "101");
            Assert.AreEqual(realoadedModule.BreedRegistrationSequence[0].BreedRegistryCodeSequence.CodingSchemeDesignator, "WD");
            Assert.AreEqual(realoadedModule.BreedRegistrationSequence[0].BreedRegistryCodeSequence.CodingSchemeVersion, "101");
            Assert.AreEqual(realoadedModule.BreedRegistrationSequence[0].BreedRegistryCodeSequence.CodeValue, "WALT_DISNESY_101");
            Assert.AreEqual(realoadedModule.BreedRegistrationSequence[0].BreedRegistryCodeSequence.CodeMeaning, "One hundred and one dalmatians");
        }
예제 #7
0
        private static KeyObjectSelectionDocumentIod CreatePrototypeDocument(IDicomAttributeProvider source, DicomAttributeCollection target, string specificCharacterSet)
        {
            KeyObjectSelectionDocumentIod iod = new KeyObjectSelectionDocumentIod(target);

            specificCharacterSet        = specificCharacterSet ?? string.Empty;
            target.SpecificCharacterSet = specificCharacterSet;
            target[DicomTags.SpecificCharacterSet].SetStringValue(specificCharacterSet);

            PatientModuleIod sourcePatient = new PatientModuleIod(source);

            if (true)             // patient module is always required
            {
                iod.Patient.BreedRegistrationSequence          = sourcePatient.BreedRegistrationSequence;
                iod.Patient.DeIdentificationMethod             = sourcePatient.DeIdentificationMethod;
                iod.Patient.DeIdentificationMethodCodeSequence = sourcePatient.DeIdentificationMethodCodeSequence;
                iod.Patient.EthnicGroup              = sourcePatient.EthnicGroup;
                iod.Patient.IssuerOfPatientId        = sourcePatient.IssuerOfPatientId;
                iod.Patient.OtherPatientIds          = sourcePatient.OtherPatientIds;
                iod.Patient.OtherPatientIdsSequence  = sourcePatient.OtherPatientIdsSequence;
                iod.Patient.OtherPatientNames        = sourcePatient.OtherPatientNames;
                iod.Patient.PatientBreedCodeSequence = sourcePatient.PatientBreedCodeSequence;
                iod.Patient.PatientBreedDescription  = sourcePatient.PatientBreedDescription;
                iod.Patient.PatientComments          = sourcePatient.PatientComments;
                iod.Patient.PatientId = sourcePatient.PatientId;
                iod.Patient.PatientIdentityRemoved     = sourcePatient.PatientIdentityRemoved;
                iod.Patient.PatientsBirthDateTime      = sourcePatient.PatientsBirthDateTime;
                iod.Patient.PatientsName               = sourcePatient.PatientsName;
                iod.Patient.PatientSpeciesCodeSequence = sourcePatient.PatientSpeciesCodeSequence;
                iod.Patient.PatientSpeciesDescription  = sourcePatient.PatientSpeciesDescription;
                iod.Patient.PatientsSex = sourcePatient.PatientsSex;
                iod.Patient.ReferencedPatientSequence = sourcePatient.ReferencedPatientSequence;
                iod.Patient.ResponsibleOrganization   = sourcePatient.ResponsibleOrganization;
                iod.Patient.ResponsiblePerson         = sourcePatient.ResponsiblePerson;
                iod.Patient.ResponsiblePersonRole     = sourcePatient.ResponsiblePersonRole;
            }

            SpecimenIdentificationModuleIod sourceSpecimen = new SpecimenIdentificationModuleIod(source);

            if (sourceSpecimen.HasValues())             // specimen module is required only if subject is a specimen
            {
                iod.SpecimenIdentification.SpecimenAccessionNumber = sourceSpecimen.SpecimenAccessionNumber;
                iod.SpecimenIdentification.SpecimenSequence        = sourceSpecimen.SpecimenSequence;
            }

            ClinicalTrialSubjectModuleIod sourceTrialSubject = new ClinicalTrialSubjectModuleIod(source);

            if (sourceTrialSubject.HasValues())             // clinical trial subkect module is user optional
            {
                iod.ClinicalTrialSubject.ClinicalTrialProtocolId       = sourceTrialSubject.ClinicalTrialProtocolId;
                iod.ClinicalTrialSubject.ClinicalTrialProtocolName     = sourceTrialSubject.ClinicalTrialProtocolName;
                iod.ClinicalTrialSubject.ClinicalTrialSiteId           = sourceTrialSubject.ClinicalTrialSiteId;
                iod.ClinicalTrialSubject.ClinicalTrialSiteName         = sourceTrialSubject.ClinicalTrialSiteName;
                iod.ClinicalTrialSubject.ClinicalTrialSponsorName      = sourceTrialSubject.ClinicalTrialSponsorName;
                iod.ClinicalTrialSubject.ClinicalTrialSubjectId        = sourceTrialSubject.ClinicalTrialSubjectId;
                iod.ClinicalTrialSubject.ClinicalTrialSubjectReadingId = sourceTrialSubject.ClinicalTrialSubjectReadingId;
            }

            GeneralStudyModuleIod sourceGeneralStudy = new GeneralStudyModuleIod(source);

            if (true)             // general study module is always required
            {
                iod.GeneralStudy.AccessionNumber = sourceGeneralStudy.AccessionNumber;
                iod.GeneralStudy.NameOfPhysiciansReadingStudy                 = sourceGeneralStudy.NameOfPhysiciansReadingStudy;
                iod.GeneralStudy.PhysiciansOfRecord                           = sourceGeneralStudy.PhysiciansOfRecord;
                iod.GeneralStudy.PhysiciansOfRecordIdentificationSequence     = sourceGeneralStudy.PhysiciansOfRecordIdentificationSequence;
                iod.GeneralStudy.PhysiciansReadingStudyIdentificationSequence = sourceGeneralStudy.PhysiciansReadingStudyIdentificationSequence;
                iod.GeneralStudy.ProcedureCodeSequence                        = sourceGeneralStudy.ProcedureCodeSequence;
                iod.GeneralStudy.ReferencedStudySequence                      = sourceGeneralStudy.ReferencedStudySequence;
                iod.GeneralStudy.ReferringPhysicianIdentificationSequence     = sourceGeneralStudy.ReferringPhysicianIdentificationSequence;
                iod.GeneralStudy.ReferringPhysiciansName                      = sourceGeneralStudy.ReferringPhysiciansName;
                iod.GeneralStudy.StudyDateTime    = sourceGeneralStudy.StudyDateTime;
                iod.GeneralStudy.StudyDescription = sourceGeneralStudy.StudyDescription;
                iod.GeneralStudy.StudyId          = sourceGeneralStudy.StudyId;
                iod.GeneralStudy.StudyInstanceUid = sourceGeneralStudy.StudyInstanceUid;
            }

            PatientStudyModuleIod sourcePatientStudy = new PatientStudyModuleIod(source);

            if (sourcePatientStudy.HasValues())             // patient study module is user optional
            {
                iod.PatientStudy.AdditionalPatientHistory = sourcePatientStudy.AdditionalPatientHistory;
                iod.PatientStudy.AdmissionId = sourcePatientStudy.AdmissionId;
                iod.PatientStudy.AdmittingDiagnosesCodeSequence = sourcePatientStudy.AdmittingDiagnosesCodeSequence;
                iod.PatientStudy.AdmittingDiagnosesDescription  = sourcePatientStudy.AdmittingDiagnosesDescription;
                iod.PatientStudy.IssuerOfAdmissionId            = sourcePatientStudy.IssuerOfAdmissionId;
                iod.PatientStudy.IssuerOfServiceEpisodeId       = sourcePatientStudy.IssuerOfServiceEpisodeId;
                iod.PatientStudy.Occupation                = sourcePatientStudy.Occupation;
                iod.PatientStudy.PatientsAge               = sourcePatientStudy.PatientsAge;
                iod.PatientStudy.PatientsSexNeutered       = sourcePatientStudy.PatientsSexNeutered;
                iod.PatientStudy.PatientsSize              = sourcePatientStudy.PatientsSize;
                iod.PatientStudy.PatientsWeight            = sourcePatientStudy.PatientsWeight;
                iod.PatientStudy.ServiceEpisodeDescription = sourcePatientStudy.ServiceEpisodeDescription;
                iod.PatientStudy.ServiceEpisodeId          = sourcePatientStudy.ServiceEpisodeId;
            }

            ClinicalTrialStudyModuleIod sourceTrialStudy = new ClinicalTrialStudyModuleIod(source);

            if (sourceTrialStudy.HasValues())             // clinical trial study module is user optional
            {
                iod.ClinicalTrialStudy.ClinicalTrialTimePointDescription = sourceTrialStudy.ClinicalTrialTimePointDescription;
                iod.ClinicalTrialStudy.ClinicalTrialTimePointId          = sourceTrialStudy.ClinicalTrialTimePointId;
            }

            return(iod);
        }