当前位置: 首页>>代码示例>>C#>>正文


C# IDicomAttributeProvider类代码示例

本文整理汇总了C#中IDicomAttributeProvider的典型用法代码示例。如果您正苦于以下问题:C# IDicomAttributeProvider类的具体用法?C# IDicomAttributeProvider怎么用?C# IDicomAttributeProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IDicomAttributeProvider类属于命名空间,在下文中一共展示了IDicomAttributeProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ColorSoftcopyPresentationStateIod

		public ColorSoftcopyPresentationStateIod(IDicomAttributeProvider provider) {
			_dicomAttributeProvider = provider;

			this.Patient = new PatientModuleIod(_dicomAttributeProvider);
			this.ClinicalTrialSubject = new ClinicalTrialSubjectModuleIod(_dicomAttributeProvider);

			this.GeneralStudy = new GeneralStudyModuleIod(_dicomAttributeProvider);
			this.PatientStudy = new PatientStudyModuleIod(_dicomAttributeProvider);
			this.ClinicalTrialStudy = new ClinicalTrialStudyModuleIod(_dicomAttributeProvider);

			this.GeneralSeries = new GeneralSeriesModuleIod(_dicomAttributeProvider);
			this.ClinicalTrialSeries = new ClinicalTrialSeriesModuleIod(_dicomAttributeProvider);
			this.PresentationSeries = new PresentationSeriesModuleIod(_dicomAttributeProvider);

			this.GeneralEquipment = new GeneralEquipmentModuleIod(_dicomAttributeProvider);

			this.PresentationStateIdentification = new PresentationStateIdentificationModuleIod(_dicomAttributeProvider);
			this.PresentationStateRelationship = new PresentationStateRelationshipModuleIod(_dicomAttributeProvider);
			this.PresentationStateShutter = new PresentationStateShutterModuleIod(_dicomAttributeProvider);
			this.DisplayShutter = new DisplayShutterModuleIod(_dicomAttributeProvider);
			this.BitmapDisplayShutter = new BitmapDisplayShutterModuleIod(_dicomAttributeProvider);
			this.OverlayPlane = new OverlayPlaneModuleIod(_dicomAttributeProvider);
			this.OverlayActivation = new OverlayActivationModuleIod(_dicomAttributeProvider);
			this.DisplayedArea = new DisplayedAreaModuleIod(_dicomAttributeProvider);
			this.GraphicAnnotation = new GraphicAnnotationModuleIod(_dicomAttributeProvider);
			this.SpatialTransform = new SpatialTransformModuleIod(_dicomAttributeProvider);
			this.GraphicLayer = new GraphicLayerModuleIod(_dicomAttributeProvider);
			this.IccProfile = new IccProfileModuleIod(_dicomAttributeProvider);
			this.SopCommon = new SopCommonModuleIod(_dicomAttributeProvider);
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:30,代码来源:ColorSoftcopyPresentationStateIod.cs

示例2: GetAttribute

        public static DicomAttribute GetAttribute(this DicomTagPath path, IDicomAttributeProvider attributes, bool create)
        {
            DicomAttribute attribute;
            var tags = new Queue<DicomTag>(path.TagsInPath);

            do
            {
                var tag = tags.Dequeue();
                attribute = attributes[tag];
                if (tags.Count == 0)
                    break;

                var sequenceItems = attribute.Values as DicomSequenceItem[];
                if (sequenceItems == null || sequenceItems.Length == 0)
                {
                    if (!create)
                        return null;

                    attribute.AddSequenceItem(new DicomSequenceItem());
                    sequenceItems = (DicomSequenceItem[]) attribute.Values;
                }

                attributes = sequenceItems[0];
            } while (tags.Count > 0);

            if (attribute.IsEmpty && create)
                attribute.SetNullValue();

            return attribute.IsEmpty ? null : attribute;
        }
开发者ID:UIKit0,项目名称:ClearCanvas,代码行数:30,代码来源:Utilities.cs

示例3: StudyInformation

		public StudyInformation(IDicomAttributeProvider attributeProvider)
		{
			if (attributeProvider[DicomTags.StudyId]!=null)
				StudyId = attributeProvider[DicomTags.StudyId].ToString();
            
			if (attributeProvider[DicomTags.AccessionNumber]!=null)
				AccessionNumber = attributeProvider[DicomTags.AccessionNumber].ToString();

			if (attributeProvider[DicomTags.StudyDate] != null )
				StudyDate = attributeProvider[DicomTags.StudyDate].ToString();

			if (attributeProvider[DicomTags.ModalitiesInStudy] != null)
				Modalities = attributeProvider[DicomTags.ModalitiesInStudy].ToString();

			if (attributeProvider[DicomTags.StudyInstanceUid] != null)
				StudyInstanceUid = attributeProvider[DicomTags.StudyInstanceUid].ToString();

			if (attributeProvider[DicomTags.StudyDescription] != null)
				StudyDescription = attributeProvider[DicomTags.StudyDescription].ToString();


			if (attributeProvider[DicomTags.ReferringPhysiciansName] != null)
				ReferringPhysician = attributeProvider[DicomTags.ReferringPhysiciansName].ToString();

			PatientInfo = new PatientInformation(attributeProvider);

		    DicomAttribute seriesUidAttr;
		    if (attributeProvider.TryGetAttribute(DicomTags.SeriesInstanceUid, out seriesUidAttr))
            {
                SeriesInformation series = new SeriesInformation(attributeProvider);
                Add(series);
            }
			
		}
开发者ID:nhannd,项目名称:Xian,代码行数:34,代码来源:StudyInformation.cs

示例4: Create

		public static ModalityDataLut Create(IDicomAttributeProvider dicomAttributeProvider)
		{
			DicomAttributeSQ modalityLutSequence = (DicomAttributeSQ)dicomAttributeProvider[DicomTags.ModalityLutSequence];
			int pixelRepresentation = GetPixelRepresentation(dicomAttributeProvider);

			return Create(modalityLutSequence, pixelRepresentation);
		}
开发者ID:kevinpig,项目名称:MyRepository,代码行数:7,代码来源:ModalityDataLut.cs

示例5: Create

			public static VolumeSopDataSourcePrototype Create(IDicomAttributeProvider source, int bitsAllocated, int bitsStored, bool isSigned)
			{
				VolumeSopDataSourcePrototype prototype = new VolumeSopDataSourcePrototype();
				DicomAttributeCollection volumeDataSet = prototype._collection;

				// perform exact copy on the Patient Module
				foreach (uint tag in PatientModuleIod.DefinedTags)
					volumeDataSet[tag] = source[tag].Copy();

				// perform exact copy on the Clinical Trial Subject Module
				foreach (uint tag in ClinicalTrialSubjectModuleIod.DefinedTags)
					volumeDataSet[tag] = source[tag].Copy();

				// perform exact copy on the General Study Module
				foreach (uint tag in GeneralStudyModuleIod.DefinedTags)
					volumeDataSet[tag] = source[tag].Copy();

				// perform exact copy on the Patient Study Module
				foreach (uint tag in PatientStudyModuleIod.DefinedTags)
					volumeDataSet[tag] = source[tag].Copy();

				// perform exact copy on the Clinical Trial Study Module
				foreach (uint tag in ClinicalTrialStudyModuleIod.DefinedTags)
					volumeDataSet[tag] = source[tag].Copy();

				// TODO JY: flesh out these other modules.

				// generate and cache Series Module attributes that are common among all slicings
				volumeDataSet[DicomTags.Modality] = source[DicomTags.Modality].Copy();
				volumeDataSet[DicomTags.SeriesNumber].SetStringValue("0");
				volumeDataSet[DicomTags.SeriesDescription] = source[DicomTags.SeriesDescription].Copy();

				// generate General Equipment Module
				// these is a ticket to properly implement the GenEq module in all created instances.
				// the ticket is specific to KO and PR, but it should equally apply to these MPR SCs

				// generate SC Equipment Module
				volumeDataSet[DicomTags.ConversionType].SetStringValue("WSD");

				// generate General Image Module
				volumeDataSet[DicomTags.ImageType].SetStringValue(@"DERIVED\SECONDARY");
				volumeDataSet[DicomTags.PixelSpacing] = source[DicomTags.PixelSpacing].Copy();
				volumeDataSet[DicomTags.FrameOfReferenceUid] = source[DicomTags.FrameOfReferenceUid].Copy();

				// generate Image Pixel Module
				volumeDataSet[DicomTags.SamplesPerPixel] = source[DicomTags.SamplesPerPixel].Copy();
				volumeDataSet[DicomTags.PhotometricInterpretation] = source[DicomTags.PhotometricInterpretation].Copy();
				volumeDataSet[DicomTags.BitsAllocated].SetInt32(0, bitsAllocated);
				volumeDataSet[DicomTags.BitsStored].SetInt32(0, bitsStored);
				volumeDataSet[DicomTags.HighBit].SetInt32(0, bitsStored - 1);
				volumeDataSet[DicomTags.PixelRepresentation].SetInt32(0, isSigned ? 1 : 0);

				// generate SOP Common Module
				volumeDataSet[DicomTags.SopClassUid].SetStringValue(SopClass.SecondaryCaptureImageStorageUid);

				return prototype;
			}
开发者ID:nhannd,项目名称:Xian,代码行数:57,代码来源:VolumeSopDataSourcePrototype.cs

示例6: FunctionalGroupMapCache

		/// <summary>
		/// Initializes a new instance of <see cref="FunctionalGroupMapCache"/>.
		/// </summary>
		/// <param name="dataSet">The data set.</param>
		/// <param name="sopClassUid">Overrides the detected SOP class UID of the data set.</param>
		/// <exception cref="ArgumentNullException">Thrown if <paramref name="dataSet"/> is NULL.</exception>
		public FunctionalGroupMapCache(IDicomAttributeProvider dataSet, string sopClassUid)
		{
			Platform.CheckForNullReference(dataSet, "dataSet");

			if (string.IsNullOrEmpty(sopClassUid))
				sopClassUid = dataSet[DicomTags.SopClassUid].ToString();

			_dataSet = dataSet;
			_cache = new Dictionary<FrameFunctionalGroupKey, FrameFunctionalGroupValue>();
			_tagMap = new MultiFrameFunctionalGroupsModuleIod(dataSet).HasValues() ? FunctionalGroupDescriptor.GetFunctionalGroupMap(sopClassUid) : null;
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:17,代码来源:FunctionalGroupMapCache.cs

示例7: Create

		public static PaletteColorMap Create(IDicomAttributeProvider dataSource)
		{
			CodeClock clock = new CodeClock();
			clock.Start();

			PaletteColorLut paletteColorLut = PaletteColorLut.Create(dataSource);

			clock.Stop();
			PerformanceReportBroker.PublishReport("PaletteColorMap", "Create(IDicomAttributeProvider)", clock.Seconds);

			return new PaletteColorMap(paletteColorLut);
		}
开发者ID:UIKit0,项目名称:ClearCanvas,代码行数:12,代码来源:PaletteColorMap.cs

示例8: FillGeneralEquipmentModule

		/// <summary>
		/// Fills basic attributes in the General Equipment module.
		/// </summary>
		/// <param name="target">The destination attribute collection whose attributes are to be updated.</param>
		protected void FillGeneralEquipmentModule(IDicomAttributeProvider target)
		{
			var targetGeneralEquipment = new GeneralEquipmentModuleIod(target);
			targetGeneralEquipment.InitializeAttributes();
			targetGeneralEquipment.Manufacturer = Manufacturer ?? string.Empty; // Manufacturer here is Type 2
			targetGeneralEquipment.InstitutionName = Institution.Name;
			targetGeneralEquipment.InstitutionAddress = Institution.Address;
			targetGeneralEquipment.StationName = StationName;
			targetGeneralEquipment.InstitutionalDepartmentName = Institution.DepartmentName;
			targetGeneralEquipment.ManufacturersModelName = ManufacturersModelName;
			targetGeneralEquipment.DeviceSerialNumber = DeviceSerialNumber;
			targetGeneralEquipment.SoftwareVersions = SoftwareVersions;
		}
开发者ID:nhannd,项目名称:Xian,代码行数:17,代码来源:SopInstanceFactory.cs

示例9: SeriesInformation

		public SeriesInformation(IDicomAttributeProvider attributeProvider)
		{
			if (attributeProvider[DicomTags.SeriesInstanceUid] != null)
				SeriesInstanceUid = attributeProvider[DicomTags.SeriesInstanceUid].ToString();
			if (attributeProvider[DicomTags.SeriesDescription] != null)
				SeriesDescription = attributeProvider[DicomTags.SeriesDescription].ToString();
			if (attributeProvider[DicomTags.Modality] != null)
				Modality = attributeProvider[DicomTags.Modality].ToString();
            if (attributeProvider[DicomTags.SeriesNumber] != null)
                SeriesNumber = attributeProvider[DicomTags.SeriesNumber].ToString();

            if (attributeProvider[DicomTags.NumberOfSeriesRelatedInstances] != null)
                Int32.TryParse(attributeProvider[DicomTags.NumberOfSeriesRelatedInstances].ToString(), out _numberOfInstances);
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:14,代码来源:SeriesInformation.cs

示例10: RawDataIod

        public RawDataIod(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);
            _acquisitionContextModule = new AcquisitionContextModuleIod(_dicomAttributeProvider);
            _rawDataModule = new RawDataModule(_dicomAttributeProvider);
			_sopCommonModule = new SopCommonModuleIod(_dicomAttributeProvider);
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:15,代码来源:RawDataIod.cs

示例11: KeyObjectSelectionDocumentIod

		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);
		}
开发者ID:scottshea,项目名称:monodicom,代码行数:16,代码来源:KeyObjectSelectionDocumentIod.cs

示例12: EncapsulatedPdfIod

		/// <summary>
		/// Initializes a new instance of the <see cref="EncapsulatedPdfIod"/> class.
		/// </summary>
		/// <param name="dicomAttributeProvider">The DICOM attribute provider.</param>
		public EncapsulatedPdfIod(IDicomAttributeProvider dicomAttributeProvider)
		{
			_dicomAttributeProvider = dicomAttributeProvider;

			_patientModule = new PatientModuleIod(_dicomAttributeProvider);
			_clinicalTrialSubjectModule = new ClinicalTrialSubjectModuleIod(_dicomAttributeProvider);
			_generalStudyModule = new GeneralStudyModuleIod(_dicomAttributeProvider);
			_patientStudyModule = new PatientStudyModuleIod(_dicomAttributeProvider);
			_clinicalTrialStudyModule = new ClinicalTrialStudyModuleIod(_dicomAttributeProvider);
			_encapsulatedDocumentSeriesModule = new EncapsulatedDocumentSeriesModuleIod(_dicomAttributeProvider);
			_clinicalTrialSeriesModule = new ClinicalTrialSeriesModuleIod(_dicomAttributeProvider);
			_generalEquipmentModule = new GeneralEquipmentModuleIod(_dicomAttributeProvider);
			_scEquipmentModule = new ScEquipmentModuleIod(_dicomAttributeProvider);
			_encapsulatedDocumentModule = new EncapsulatedDocumentModuleIod(_dicomAttributeProvider);
			_sopCommonModule = new SopCommonModuleIod(_dicomAttributeProvider);
		}
开发者ID:nhannd,项目名称:Xian,代码行数:20,代码来源:EncapsulatedPdfIod.cs

示例13: PatientInformation

		public PatientInformation(IDicomAttributeProvider attributeProvider)
		{
			if (attributeProvider[DicomTags.PatientsName] != null)
				Name = attributeProvider[DicomTags.PatientsName].ToString();

			if (attributeProvider[DicomTags.PatientId] != null)
				PatientId = attributeProvider[DicomTags.PatientId].ToString();

			if (attributeProvider[DicomTags.PatientsAge] != null)
				Age = attributeProvider[DicomTags.PatientsAge].ToString();

			if (attributeProvider[DicomTags.PatientsBirthDate] != null)
				PatientsBirthdate = attributeProvider[DicomTags.PatientsBirthDate].ToString();

			if (attributeProvider[DicomTags.PatientsSex] != null)
				Sex = attributeProvider[DicomTags.PatientsSex].ToString();

			if (attributeProvider[DicomTags.IssuerOfPatientId] != null)
				IssuerOfPatientId = attributeProvider[DicomTags.IssuerOfPatientId].ToString();
		}
开发者ID:nhannd,项目名称:Xian,代码行数:20,代码来源:PatientInformation.cs

示例14: SetImagePixels

		/// <summary>
		/// Sets the image pixel module on the given dataset.
		/// </summary>
		/// <param name="dataset">The dataset.</param>
		/// <param name="pixelData">The pixel data.</param>
		/// <param name="rows">The number of rows per frame.</param>
		/// <param name="columns">The number of columns per frame.</param>
		/// <param name="frames">The number of frames.</param>
		/// <param name="bitsAllocated">The bits allocated per pixel.</param>
		/// <param name="bitsStored">The bits stored per pixel.</param>
		/// <param name="highBit">The position of the high bit in each pixel allocation.</param>
		/// <param name="isSigned">Whether or not pixels are signed.</param>
		/// <exception cref="ArgumentException">Thrown if input values are inconsistent.</exception>
		public static void SetImagePixels(IDicomAttributeProvider dataset, byte[] pixelData, int rows, int columns, int frames, int bitsAllocated, int bitsStored, int highBit, bool isSigned)
		{
			// sanity check
			Platform.CheckForNullReference(dataset, "dataset");
			Platform.CheckForNullReference(pixelData, "pixelData");
			Platform.CheckArgumentRange(bitsStored, 1, 16, "bitsStored");
			Platform.CheckTrue(highBit >= bitsStored - 1 && highBit <= 15, "highBit must be between bitsStored-1 and 15, inclusive");
			Platform.CheckTrue(bitsAllocated == 8 || bitsAllocated == 16, "bitsAllocated must be 8 or 16");
			Platform.CheckTrue(rows*columns*frames*(bitsAllocated/8) == pixelData.Length, "pixelData must have length equal to rows*columns*frames*bitsAllocated/8");

			// set attributes
			dataset[DicomTags.Rows].SetInt32(0, rows);
			dataset[DicomTags.Columns].SetInt32(0, columns);
			dataset[DicomTags.BitsAllocated].SetInt32(0, bitsAllocated);
			dataset[DicomTags.BitsStored].SetInt32(0, bitsStored);
			dataset[DicomTags.HighBit].SetInt32(0, highBit);
			dataset[DicomTags.SamplesPerPixel].SetInt32(0, 1);
			dataset[DicomTags.PlanarConfiguration].SetInt32(0, 0);
			dataset[DicomTags.PixelRepresentation].SetInt32(0, isSigned ? 1 : 0);
			dataset[DicomTags.NumberOfFrames].SetInt32(0, frames);
			dataset[DicomTags.PhotometricInterpretation].SetStringValue(PhotometricInterpretation.Monochrome2.Code);
			dataset[FixVR(DicomTags.PixelData, bitsAllocated == 16 ? DicomVr.OWvr : DicomVr.OBvr)].Values = pixelData;
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:36,代码来源:DicomOverlayTestHelper.cs

示例15: ScImageIod

		/// <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);
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:27,代码来源:ScImageIod.cs


注:本文中的IDicomAttributeProvider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。