Пример #1
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);
		}
		private static void FillScImageModule(IDicomAttributeProvider target, Frame sourceFrame)
		{
			var targetModule = new ScImageModuleIod(target);
			targetModule.DateTimeOfSecondaryCapture = Platform.Time;

			if (!sourceFrame.NormalizedPixelSpacing.IsNull)
			{
				targetModule.PixelSpacing = new[] {sourceFrame.NormalizedPixelSpacing.Row, sourceFrame.NormalizedPixelSpacing.Column};
				targetModule.PixelSpacingCalibrationType = sourceFrame.NormalizedPixelSpacing.CalibrationType.ToPixelSpacingCalibrationType();
				targetModule.PixelSpacingCalibrationDescription = !string.IsNullOrEmpty(sourceFrame.NormalizedPixelSpacing.CalibrationDetails)
				                                                  	? sourceFrame.NormalizedPixelSpacing.CalibrationDetails
				                                                  	: sourceFrame.NormalizedPixelSpacing.CalibrationType.GetDescription();
			}
		}