예제 #1
0
        /// <summary>
        /// Delete film box with specified SOP instance UID
        /// </summary>
        /// <param name="sopInstance">Target film box SOP instance UID</param>
        public bool DeleteFilmBox(DicomUID sopInstance)
        {
            var filmBox = FindFilmBox(sopInstance);

            if (filmBox != null)
            {
                BasicFilmBoxes.Remove(filmBox);
                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #2
0
        /// <summary>
        /// Create new basic film box and add it to the film session
        /// </summary>
        /// <param name="sopInstance">The new film box SOP instance UID</param>
        /// <param name="dataset">The new film box dataset</param>
        /// <returns>The created film box instance</returns>
        public FilmBox CreateFilmBox(DicomUID sopInstance, DicomDataset dataset)
        {
            DicomUID uid = sopInstance;

            if (uid == null || uid.UID == string.Empty)
            {
                uid = DicomUID.Generate();
            }

            var filmBox = new FilmBox(this, uid, dataset);

            BasicFilmBoxes.Add(filmBox);

            return(filmBox);
        }
예제 #3
0
 /// <summary>
 /// Find film box instance with specified SOP instance UID
 /// </summary>
 /// <param name="sopInstance">Target film box SOP instance UID</param>
 /// <returns>Target film box instance or null if no matching found</returns>
 public FilmBox FindFilmBox(DicomUID sopInstance)
 {
     return(BasicFilmBoxes.FirstOrDefault(f => f.SOPInstanceUID.UID == sopInstance.UID));
 }