Ejemplo n.º 1
0
 public void Dispose()
 {
     if (_sop != null)
     {
         _sop.OnReferenceDisposed();
         _sop = null;
     }
 }
Ejemplo n.º 2
0
 internal void SetSop(Sop sop)
 {
     if (sop == null)
     {
         _sop = null;
     }
     else if (_sop == null)
     {
         _sop = sop;
     }
 }
Ejemplo n.º 3
0
        internal void SetSop(Sop sop)
        {
            if (sop == null)
            {
                _sop = null;
            }
            else if (_sop == null)
            {
                _sop = sop;
            }

            this.ParentPatient.SetSop(sop);
        }
Ejemplo n.º 4
0
        private void AddPatient(Sop sop)
        {
            if (_patients[sop.PatientId] != null)
            {
                return;
            }

            Patient patient = new Patient();

            patient.SetSop(sop);

            _patients.Add(patient);
        }
Ejemplo n.º 5
0
        internal void SetSop(Sop sop)
        {
            if (sop == null)
            {
                _sop = null;
            }
            else if (_sop == null)
            {
                _sop = sop;
            }

            ParentStudy.SetSop(sop);
        }
Ejemplo n.º 6
0
        private void AddStudy(Sop sop)
        {
            if (_studies.ContainsKey(sop.StudyInstanceUid))
            {
                return;
            }

            Patient patient = _patients[sop.PatientId];
            Study   study   = new Study(patient);

            study.SetSop(sop);
            patient.Studies.Add(study);

            _studies[study.StudyInstanceUid] = study;
        }
Ejemplo n.º 7
0
        private void AddSeries(Sop sop)
        {
            Series series;

            if (_series.ContainsKey(sop.SeriesInstanceUid))
            {
                series = _series[sop.SeriesInstanceUid];
            }
            else
            {
                Study study = _studies[sop.StudyInstanceUid];
                series = new Series(study);
                series.SetSop(sop);
                study.Series.Add(series);

                _series[series.SeriesInstanceUid] = series;
            }

            sop.ParentSeries = series;
            series.Sops.Add(sop);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Adds a <see cref="Sop"/> to the <see cref="StudyTree"/>.
        /// </summary>
        public bool AddSop(Sop sop)
        {
            Platform.CheckForNullReference(sop, "sop");

            if (!this.SopValidationDisabled)
            {
                sop.Validate();
            }

            if (_sops.ContainsKey(sop.SopInstanceUid))
            {
                sop.Dispose();
                return(false);
            }

            AddPatient(sop);
            AddStudy(sop);
            AddSeries(sop);
            _sops[sop.SopInstanceUid] = sop;

            return(true);
        }
Ejemplo n.º 9
0
 /// <summary>
 /// Creates a <see cref="Sop"/> from the given <see cref="ISopDataSource"/>.
 /// </summary>
 protected virtual Sop CreateSop(ISopDataSource dataSource)
 {
     return(Sop.Create(dataSource));
 }
Ejemplo n.º 10
0
 public SopReference(Sop sop)
 {
     _sop = sop;
     _sop.OnReferenceCreated();
 }