/// <summary> /// Overridden to subscribe to workspace activation events /// </summary> public override void Initialize() { base.Initialize(); _patientReconciliationStrategy.SetStudyTree(base.ImageViewer.StudyTree); _imageSetGroups = new ImageSetGroups(base.Context.Viewer.LogicalWorkspace.ImageSets); }
/// <summary> /// Constructor that allows a custom binding to be supplied. /// </summary> /// <param name="imageSets"></param> /// <param name="primaryStudyInstanceUid"></param> /// <param name="binding"></param> public ImageSetTree(ObservableList<IImageSet> imageSets, string primaryStudyInstanceUid, ImageSetTreeItemBinding binding) { _primaryStudyInstanceUid = primaryStudyInstanceUid; _imageSetGroups = new ImageSetGroups(imageSets); _internalTree = new ImageSetTreeGroupItem(_imageSetGroups.Root, new StudyDateComparer(), binding); UpdateInternalTreeRoot(); _internalTree.Updated += OnInternalTreeUpdated; }
public void Test() { IImageSet imageSet1 = CreateImageSet("Patient1", "Patient1"); IImageSet imageSet2 = CreateImageSet("Patient1", "Patient1"); ImageSetCollection collection = new ImageSetCollection(); collection.Add(imageSet1); collection.Add(imageSet2); ImageSetGroups groups = new ImageSetGroups(collection); Assert.IsTrue(groups.Root.Items.Count == 0); Assert.IsTrue(groups.Root.ChildGroups.Count == 1); Assert.IsTrue(groups.Root.ChildGroups[0].Items.Count == 2); imageSet1.Dispose(); imageSet2.Dispose(); }