本文整理汇总了C#中Dicom.Data.DcmDataset.GetDouble方法的典型用法代码示例。如果您正苦于以下问题:C# DcmDataset.GetDouble方法的具体用法?C# DcmDataset.GetDouble怎么用?C# DcmDataset.GetDouble使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dicom.Data.DcmDataset
的用法示例。
在下文中一共展示了DcmDataset.GetDouble方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DcmPixelData
public DcmPixelData(DcmDataset dataset) {
_transferSyntax = dataset.InternalTransferSyntax;
_lossy = dataset.GetString(DicomTags.LossyImageCompression, "00") != "00";
_lossyMethod = dataset.GetString(DicomTags.LossyImageCompressionMethod, String.Empty);
_lossyRatio = dataset.GetString(DicomTags.LossyImageCompressionRatio, String.Empty);
_frames = dataset.GetInt32(DicomTags.NumberOfFrames, 1);
_width = dataset.GetUInt16(DicomTags.Columns, 0);
_height = dataset.GetUInt16(DicomTags.Rows, 0);
_bitsStored = dataset.GetUInt16(DicomTags.BitsStored, 0);
_bitsAllocated = dataset.GetUInt16(DicomTags.BitsAllocated, 0);
_highBit = dataset.GetUInt16(DicomTags.HighBit, (ushort)(_bitsStored - 1));
_samplesPerPixel = dataset.GetUInt16(DicomTags.SamplesPerPixel, 0);
_pixelRepresentation = dataset.GetUInt16(DicomTags.PixelRepresentation, 0);
_planarConfiguration = dataset.GetUInt16(DicomTags.PlanarConfiguration, 0);
_photometricInterpretation = dataset.GetString(DicomTags.PhotometricInterpretation, String.Empty);
_rescaleSlope = dataset.GetDouble(DicomTags.RescaleSlope, 1.0);
_rescaleIntercept = dataset.GetDouble(DicomTags.RescaleIntercept, 0.0);
_pixelDataItem = dataset.GetItem(DicomTags.PixelData);
_hasPixelPadding = dataset.Contains(DicomTags.PixelPaddingValue);
if (_hasPixelPadding) {
DcmElement elem = dataset.GetElement(DicomTags.PixelPaddingValue);
if (elem is DcmUnsignedShort)
_pixelPaddingValue = (elem as DcmUnsignedShort).GetValue();
else if (elem is DcmSignedShort) {
_pixelPaddingValue = (elem as DcmSignedShort).GetValue();
} else
_pixelPaddingValue = MinimumDataValue;
}
}