public MprVolume(Volume volume, IEnumerable <IMprSliceSet> sliceSets) { Platform.CheckForNullReference(volume, "volume"); // MprVolume is the de jure owner of the Volume // Everything else (like the SOPs) just hold transient references _volume = volume; _sliceSets = new ObservableDisposableList <IMprSliceSet>(); if (sliceSets != null) { foreach (IMprSliceSet sliceSet in sliceSets) { if (sliceSet is IInternalMprSliceSet) { ((IInternalMprSliceSet)sliceSet).Parent = this; } _sliceSets.Add(sliceSet); } } _sliceSets.EnableEvents = true; _sliceSets.ItemAdded += OnItemAdded; _sliceSets.ItemChanged += OnItemAdded; _sliceSets.ItemChanging += OnItemRemoved; _sliceSets.ItemRemoved += OnItemRemoved; }
public MprViewerComponent() : base(new MprLayoutManager(), null) { _volumes = new ObservableDisposableList<IMprVolume>(); _volumes.EnableEvents = true; _mprWorkspace = new BasicMprWorkspace(this); }
public MprViewerComponent() : base(new MprLayoutManager(), null) { _volumes = new ObservableDisposableList <IMprVolume>(); _volumes.EnableEvents = true; _mprWorkspace = new BasicMprWorkspace(this); }
public MprVolume(Volumes.Volume volume, IEnumerable<IMprSliceSet> sliceSets) { Platform.CheckForNullReference(volume, "volume"); // MprVolume is the de jure owner of the Volume // Everything else (like the SOPs) just hold transient references _volume = volume; _sliceSets = new ObservableDisposableList<IMprSliceSet>(); if (sliceSets != null) { foreach (IMprSliceSet sliceSet in sliceSets) { if (sliceSet is IInternalMprSliceSet) ((IInternalMprSliceSet) sliceSet).Parent = this; _sliceSets.Add(sliceSet); } } _sliceSets.EnableEvents = true; _sliceSets.ItemAdded += OnItemAdded; _sliceSets.ItemChanged += OnItemAdded; _sliceSets.ItemChanging += OnItemRemoved; _sliceSets.ItemRemoved += OnItemRemoved; // Generate a descriptive name for the volume PersonName patientName = new PersonName(_volume.DataSet[DicomTags.PatientsName].ToString()); string patientId = _volume.DataSet[DicomTags.PatientId].ToString(); string seriesDescription = _volume.DataSet[DicomTags.SeriesDescription].ToString(); if (string.IsNullOrEmpty(seriesDescription)) _description = string.Format(SR.FormatVolumeLabel, patientName.FormattedName, patientId, seriesDescription); else _description = string.Format(SR.FormatVolumeLabelWithSeries, patientName.FormattedName, patientId, seriesDescription); }
protected MprSliceSet(Volumes.Volume volume) { Platform.CheckForNullReference(volume, "volume"); _volume = volume.CreateReference(); _sliceSops = new ObservableDisposableList<MprSliceSop>(); _sliceSops.EnableEvents = true; _sliceSops.ItemAdded += OnItemAdded; _sliceSops.ItemChanged += OnItemChanged; _sliceSops.ItemChanging += OnItemChanging; _sliceSops.ItemRemoved += OnItemRemoved; }
protected MprSliceSet(Volume volume) { Platform.CheckForNullReference(volume, "volume"); _volume = volume.CreateTransientReference(); _sliceSops = new ObservableDisposableList <MprSliceSop>(); _sliceSops.EnableEvents = true; _sliceSops.ItemAdded += OnItemAdded; _sliceSops.ItemChanged += OnItemChanged; _sliceSops.ItemChanging += OnItemChanging; _sliceSops.ItemRemoved += OnItemRemoved; }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { if (_mprWorkspace != null) { _mprWorkspace.Dispose(); _mprWorkspace = null; } if (_volumes != null) { _volumes.Dispose(); _volumes = null; } } }
protected virtual void Dispose(bool disposing) { if (disposing) { if (_sliceSets != null) { _sliceSets.ItemAdded -= OnItemAdded; _sliceSets.ItemChanged -= OnItemAdded; _sliceSets.ItemChanging -= OnItemRemoved; _sliceSets.ItemRemoved -= OnItemRemoved; _sliceSets.Dispose(); _sliceSets = null; } if (_volume != null) { _volume.Dispose(); _volume = null; } } }
public MprVolume(Volumes.Volume volume, IEnumerable <IMprSliceSet> sliceSets) { Platform.CheckForNullReference(volume, "volume"); // MprVolume is the de jure owner of the Volume // Everything else (like the SOPs) just hold transient references _volume = volume; _sliceSets = new ObservableDisposableList <IMprSliceSet>(); if (sliceSets != null) { foreach (IMprSliceSet sliceSet in sliceSets) { if (sliceSet is IInternalMprSliceSet) { ((IInternalMprSliceSet)sliceSet).Parent = this; } _sliceSets.Add(sliceSet); } } _sliceSets.EnableEvents = true; _sliceSets.ItemAdded += OnItemAdded; _sliceSets.ItemChanged += OnItemAdded; _sliceSets.ItemChanging += OnItemRemoved; _sliceSets.ItemRemoved += OnItemRemoved; // Generate a descriptive name for the volume PersonName patientName = new PersonName(_volume.DataSet[DicomTags.PatientsName].ToString()); string patientId = _volume.DataSet[DicomTags.PatientId].ToString(); string seriesDescription = _volume.DataSet[DicomTags.SeriesDescription].ToString(); if (string.IsNullOrEmpty(seriesDescription)) { _description = string.Format(SR.FormatVolumeLabel, patientName.FormattedName, patientId, seriesDescription); } else { _description = string.Format(SR.FormatVolumeLabelWithSeries, patientName.FormattedName, patientId, seriesDescription); } }
public MprVolume(Volume volume, IEnumerable<IMprSliceSet> sliceSets) { Platform.CheckForNullReference(volume, "volume"); // MprVolume is the de jure owner of the Volume // Everything else (like the SOPs) just hold transient references _volume = volume; _sliceSets = new ObservableDisposableList<IMprSliceSet>(); if (sliceSets != null) { foreach (IMprSliceSet sliceSet in sliceSets) { if (sliceSet is IInternalMprSliceSet) ((IInternalMprSliceSet) sliceSet).Parent = this; _sliceSets.Add(sliceSet); } } _sliceSets.EnableEvents = true; _sliceSets.ItemAdded += OnItemAdded; _sliceSets.ItemChanged += OnItemAdded; _sliceSets.ItemChanging += OnItemRemoved; _sliceSets.ItemRemoved += OnItemRemoved; }
protected virtual void Dispose(bool disposing) { if (disposing) { if (_sliceSops != null) { _sliceSops.ItemAdded -= OnItemAdded; _sliceSops.ItemChanged -= OnItemChanged; _sliceSops.ItemChanging -= OnItemChanging; _sliceSops.ItemRemoved -= OnItemRemoved; _sliceSops.Dispose(); _sliceSops = null; } if (_volume != null) { _volume.Dispose(); _volume = null; } } }