private string GetActionLabel(IDicomImageSetDescriptor descriptor)
			{
				if (descriptor.IsOffline)
					return String.Format(SR.LabelFormatStudyUnavailable, SR.Offline);
				else if (descriptor.IsNearline)
					return String.Format(SR.LabelFormatStudyUnavailable, SR.Nearline);
				else if (descriptor.IsInUse)
					return String.Format(SR.LabelFormatStudyUnavailable, SR.InUse);
				else if (descriptor.IsNotLoadable)
					return String.Format(SR.LabelFormatStudyUnavailable, SR.Unavailable);
				else
					return SR.LabelStudyCouldNotBeLoaded;
			}
			private string GetActionMessage(IDicomImageSetDescriptor descriptor)
			{
				if (descriptor.IsOffline)
                    return ClearCanvas.ImageViewer.SR.MessageInfoStudyOffline;
				else if (descriptor.IsNearline)
                    return ClearCanvas.ImageViewer.SR.MessageInfoStudyNearline;
				else if (descriptor.IsInUse)
                    return ClearCanvas.ImageViewer.SR.MessageInfoStudyInUse;
				else if (descriptor.IsNotLoadable)
                    return ClearCanvas.ImageViewer.SR.MessageInfoNoStudyLoader;
				else
                    return ClearCanvas.ImageViewer.SR.MessageInfoStudyCouldNotBeLoaded;
			}
Beispiel #3
0
        private IEnumerable <IComparable> GetCompareValues(IImageSet imageSet)
        {
            DateTime?studyDate = null;
            DateTime?studyTime = null;

            IDicomImageSetDescriptor descriptor = imageSet.Descriptor as IDicomImageSetDescriptor;

            if (descriptor == null)
            {
                if (imageSet.DisplaySets.Count == 0)
                {
                    Debug.Assert(false, "All image sets being sorted must have at least one display set with at least one image in order for them to be sorted properly.");
                }
                else if (imageSet.DisplaySets[0].PresentationImages.Count == 0)
                {
                    Debug.Assert(false, "All image sets being sorted must have at least one display set with at least one image in order for them to be sorted properly.");
                }
                else
                {
                    ISopProvider provider = imageSet.DisplaySets[0].PresentationImages[0] as ISopProvider;
                    if (provider != null)
                    {
                        studyDate = DateParser.Parse(provider.Sop.StudyDate);
                        studyTime = TimeParser.Parse(provider.Sop.StudyTime);
                    }
                }
            }
            else
            {
                studyDate = DateParser.Parse(descriptor.SourceStudy.StudyDate);
                studyTime = TimeParser.Parse(descriptor.SourceStudy.StudyTime);
            }

            yield return(studyDate);

            yield return(studyTime);

            yield return(imageSet.Name);
        }
 private string GetActionLabel(IDicomImageSetDescriptor descriptor)
 {
     if (descriptor.IsOffline)
     {
         return(String.Format(SR.LabelFormatStudyUnavailable, SR.Offline));
     }
     else if (descriptor.IsNearline)
     {
         return(String.Format(SR.LabelFormatStudyUnavailable, SR.Nearline));
     }
     else if (descriptor.IsInUse)
     {
         return(String.Format(SR.LabelFormatStudyUnavailable, SR.InUse));
     }
     else if (descriptor.IsNotLoadable)
     {
         return(String.Format(SR.LabelFormatStudyUnavailable, SR.Unavailable));
     }
     else
     {
         return(SR.LabelStudyCouldNotBeLoaded);
     }
 }
 private string GetActionMessage(IDicomImageSetDescriptor descriptor)
 {
     if (descriptor.IsOffline)
     {
         return(ClearCanvas.ImageViewer.SR.MessageInfoStudyOffline);
     }
     else if (descriptor.IsNearline)
     {
         return(ClearCanvas.ImageViewer.SR.MessageInfoStudyNearline);
     }
     else if (descriptor.IsInUse)
     {
         return(ClearCanvas.ImageViewer.SR.MessageInfoStudyInUse);
     }
     else if (descriptor.IsNotLoadable)
     {
         return(ClearCanvas.ImageViewer.SR.MessageInfoNoStudyLoader);
     }
     else
     {
         return(ClearCanvas.ImageViewer.SR.MessageInfoStudyCouldNotBeLoaded);
     }
 }