本文整理汇总了C#中Dicom.Data.DcmDataset.Clone方法的典型用法代码示例。如果您正苦于以下问题:C# DcmDataset.Clone方法的具体用法?C# DcmDataset.Clone怎么用?C# DcmDataset.Clone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dicom.Data.DcmDataset
的用法示例。
在下文中一共展示了DcmDataset.Clone方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateFilmSession
private void CreateFilmSession()
{
DcmDataset fimSessionDataset = new DcmDataset(DicomTransferSyntax.ImplicitVRLittleEndian);
_filmSession = new DcmFilmSession(DcmFilmSession.SOPClassUID,
DicomUID.Generate(), fimSessionDataset.Clone());
_filmSession.FilmDestination = _filmDestination;
_filmSession.FilmSessionLabel = _filmSessionLabel;
_filmSession.MediumType = _mediumType;
_filmSession.NumberOfCopies = _numberOfCopies;
_filmSession.OwnerID = _ownerID;
_filmSession.PrintPriority = _printPriority;
byte pcid = Associate.FindAbstractSyntax(DicomUID.BasicGrayscalePrintManagementMetaSOPClass);
SendNCreateRequest(pcid, NextMessageID(), DcmFilmSession.SOPClassUID, _filmSession.SOPInstanceUID, _filmSession.Dataset);
}
示例2: OnReceiveNCreateResponse
protected override void OnReceiveNCreateResponse(byte presentationID, ushort messageIdRespondedTo, DicomUID affectedClass, DicomUID affectedInstance,
DcmDataset dataset, DcmStatus status)
{
if (_filmSession != null)
{
if (affectedClass == DicomUID.BasicFilmSessionSOPClass)
{
if (status == DcmStatus.Success)
{
int filmBoxesCount = CalculateRequiredImageBoxes();
if (filmBoxesCount == 0)
{
SendReleaseRequest();
return;
}
for (int i = 0; i < filmBoxesCount; i++)
{
DicomUID uid = DicomUID.Generate();
DcmDataset filmBoxDataset = new DcmDataset(DicomTransferSyntax.ImplicitVRLittleEndian);
DcmFilmBox filmBox = _filmSession.CreateFilmBox(uid, filmBoxDataset.Clone());
filmBox.AnnotationDisplayFormatID = _annotationDisplayFormatID;
filmBox.BorderDensity = _borderDensity;
filmBox.ConfigurationInformation = _configurationInformation;
filmBox.EmptyImageDensity = _emptyImageDensity;
filmBox.FilmOrientation = _filmOrientation;
filmBox.FilmSizeID = _filmSizeID;
filmBox.Illumination = _illumination;
filmBox.ImageDisplayFormat = _imageDisplayFormat;
filmBox.MagnificationType = _magnificationType;
filmBox.MaxDensity = _maxDensity;
filmBox.MinDensity = _minDensity;
filmBox.ReflectedAmbientLight = _reflectedAmbientLight;
filmBox.RequestedResolutionID = _requestedResolutionID;
filmBox.SmoothingType = _smoothingType;
filmBox.Trim = _trim;
byte pcid = Associate.FindAbstractSyntax(DicomUID.BasicGrayscalePrintManagementMetaSOPClass);
SendNCreateRequest(pcid, NextMessageID(), DicomUID.BasicFilmBoxSOPClass, filmBox.SOPInstanceUID, filmBox.Dataset);
}
return;
}
}
if (affectedClass == DicomUID.BasicFilmBoxSOPClass)
{
if (status == DcmStatus.Success)
{
DcmFilmBox filmBox = _filmSession.FindFilmBox(affectedInstance);
int filmBoxIndex = _filmSession.BasicFilmBoxes.IndexOf(filmBox);
if (filmBox != null)
{
DcmItemSequence referencedImageBoxSequenceList = null;
referencedImageBoxSequenceList = dataset.GetSQ(DicomTags.ReferencedImageBoxSequence);
if (referencedImageBoxSequenceList != null)
{
foreach (DcmItemSequenceItem item in referencedImageBoxSequenceList.SequenceItems)
{
DicomUID referencedSOPInstanceUID = item.Dataset.GetUID(DicomTags.ReferencedSOPInstanceUID);
if (referencedSOPInstanceUID != null)
{
DcmImageBox imageBox = new DcmImageBox(filmBox, DcmImageBox.GraySOPClassUID, referencedSOPInstanceUID);
filmBox.BasicImageBoxes.Add(imageBox);
}
}
}
_pendingImageBoxResponses.Clear();
if (filmBox.BasicImageBoxes.Count > 0)
{
int imageBoxIndex = 0;
int imagesPerFilmbox = CalculateImagesPreFilmBox();
foreach (DcmImageBox imageBox in filmBox.BasicImageBoxes)
{
if (imagesPerFilmbox * filmBoxIndex + imageBoxIndex < _files.Count)
{
UpdateImageBox(imageBox, _files[imagesPerFilmbox * filmBoxIndex + imageBoxIndex], imageBoxIndex);
}
_pendingImageBoxResponses.Add(imageBox);
imageBoxIndex++;
byte pcid = Associate.FindAbstractSyntax(DicomUID.PrinterSOPClass);
SendNSetRequest(pcid, NextMessageID(), imageBox.SOPClassUID, imageBox.SOPInstanceUID, imageBox.Dataset);
}
}
return;
}
}
}
}
SendAbort(DcmAbortSource.ServiceUser, DcmAbortReason.NotSpecified);
}