Esempio n. 1
0
        /// <summary>
        /// Try to find a a referenced item with the same SOP Class UID and SOP Instance UID as those given.
        /// </summary>
        /// <param name="sopClassUid">SOP Class UID to find.</param>
        /// <param name="sopInstanceUid">SOP Instance UID to find.</param>
        /// <returns>Matching referenced sop item - or null if no match.</returns>
        public ReferencedSopItem Find(System.String sopClassUid, System.String sopInstanceUid)
        {
            ReferencedSopItem referencedSopItem = null;

            foreach (ReferencedSopItem lReferencedSopItem in this)
            {
                if ((lReferencedSopItem.SopClassUid == sopClassUid) &&
                    (lReferencedSopItem.SopInstanceUid == sopInstanceUid))
                {
                    referencedSopItem = lReferencedSopItem;
                    break;
                }
            }

            return(referencedSopItem);
        }
 /// <summary>
 /// Copies the elements of the <see cref="ICollection"/> to a strong-typed <c>ReferencedSopItem[]</c>, 
 /// starting at a particular <c>ReferencedSopItem[]</c> index.
 /// </summary>
 /// <param name="array">
 /// The one-dimensional <c>ReferencedSopItem[]</c> that is the destination of the elements 
 /// copied from <see cref="ICollection"/>.
 /// The <c>ReferencedSopItem[]</c> must have zero-based indexing. 
 /// </param>
 /// <param name="index">
 /// The zero-based index in array at which copying begins.
 /// </param>
 /// <remarks>
 /// Provides the strongly typed member for <see cref="ICollection"/>.
 /// </remarks>
 public void CopyTo(ReferencedSopItem[] array, int index)
 {
     ((ICollection)this).CopyTo(array, index);
 }
 /// <summary>
 /// Determines whether the <see cref="ReferencedSopItemCollection"/> contains a specific element.
 /// </summary>
 /// <param name="value">The <see cref="ReferencedSopItem"/> to locate in the <see cref="ReferencedSopItemCollection"/>.</param>
 /// <returns>
 /// <c>true</c> if the <see cref="ReferencedSopItemCollection"/> contains the specified value; 
 /// otherwise, <c>false</c>.
 /// </returns>
 public bool Contains(ReferencedSopItem value)
 {
     // If value is not of type Code, this will return false.
     return (List.Contains(value));
 }
 /// <summary>
 /// Adds an object to the end of the <see cref="ReferencedSopItemCollection"/>.
 /// </summary>
 /// <param name="value">The <see cref="ReferencedSopItem"/> to be added to the end of the <see cref="ReferencedSopItemCollection"/>.</param>
 /// <returns>The <see cref="ReferencedSopItemCollection"/> index at which the value has been added.</returns>
 public int Add(ReferencedSopItem value)
 {
     return (List.Add(value));
 }
 /// <summary>
 /// Removes the first occurrence of a specific <see cref="ReferencedSopItem"/> from the <see cref="ReferencedSopItemCollection"/>.
 /// </summary>
 /// <param name="value">The <see cref="ReferencedSopItem"/> to remove from the <see cref="ReferencedSopItemCollection"/>.</param>
 public void Remove(ReferencedSopItem value)
 {
     List.Remove(value);
 }
 /// <summary>
 /// Inserts an <see cref="ReferencedSopItem"/> element into the <see cref="ReferencedSopItemCollection"/> at the specified index.
 /// </summary>
 /// <param name="index">The zero-based index at which value should be inserted.</param>
 /// <param name="value">The <see cref="ReferencedSopItem"/> to insert.</param>
 public void Insert(int index, ReferencedSopItem value)
 {
     List.Insert(index, value);
 }
 /// <summary>
 /// Searches for the specified <see cref="ReferencedSopItem"/> and 
 /// returns the zero-based index of the first occurrence within the entire <see cref="ReferencedSopItemCollection"/>.
 /// </summary>
 /// <param name="value">The <see cref="ReferencedSopItem"/> to locate in the <see cref="ReferencedSopItemCollection"/>.</param>
 /// <returns>
 /// The zero-based index of the first occurrence of value within the entire <see cref="ReferencedSopItemCollection"/>, 
 /// if found; otherwise, -1.
 /// </returns>
 public int IndexOf(ReferencedSopItem value)
 {
     return (List.IndexOf(value));
 }
Esempio n. 8
0
 private static void AddSopData(ReferencedSopItemCollection storageCommitItems, DvtkHighLevelInterface.Dicom.Messages.DicomMessage dicomMessage)
 {
     Values values = dicomMessage.CommandSet["0x00000002"].Values;
     System.String sopClassUid = values[0];
     values = dicomMessage.CommandSet["0x00001000"].Values;
     System.String sopInstanceUid = values[0];
     ReferencedSopItem storageCommitItem = storageCommitItems.Find(sopClassUid, sopInstanceUid);
     if (storageCommitItem == null)
     {
         storageCommitItem = new ReferencedSopItem(sopClassUid, sopInstanceUid);
         storageCommitItem.InstanceState = InstanceStateEnum.InstanceStored;
         storageCommitItems.Add(storageCommitItem);
     }
 }
Esempio n. 9
0
 /// <summary>
 /// Determines whether the <see cref="ReferencedSopItemCollection"/> contains a specific element.
 /// </summary>
 /// <param name="value">The <see cref="ReferencedSopItem"/> to locate in the <see cref="ReferencedSopItemCollection"/>.</param>
 /// <returns>
 /// <c>true</c> if the <see cref="ReferencedSopItemCollection"/> contains the specified value;
 /// otherwise, <c>false</c>.
 /// </returns>
 public bool Contains(ReferencedSopItem value)
 {
     // If value is not of type Code, this will return false.
     return(List.Contains(value));
 }
Esempio n. 10
0
 /// <summary>
 /// Removes the first occurrence of a specific <see cref="ReferencedSopItem"/> from the <see cref="ReferencedSopItemCollection"/>.
 /// </summary>
 /// <param name="value">The <see cref="ReferencedSopItem"/> to remove from the <see cref="ReferencedSopItemCollection"/>.</param>
 public void Remove(ReferencedSopItem value)
 {
     List.Remove(value);
 }
Esempio n. 11
0
 /// <summary>
 /// Inserts an <see cref="ReferencedSopItem"/> element into the <see cref="ReferencedSopItemCollection"/> at the specified index.
 /// </summary>
 /// <param name="index">The zero-based index at which value should be inserted.</param>
 /// <param name="value">The <see cref="ReferencedSopItem"/> to insert.</param>
 public void Insert(int index, ReferencedSopItem value)
 {
     List.Insert(index, value);
 }
Esempio n. 12
0
 /// <summary>
 /// Searches for the specified <see cref="ReferencedSopItem"/> and
 /// returns the zero-based index of the first occurrence within the entire <see cref="ReferencedSopItemCollection"/>.
 /// </summary>
 /// <param name="value">The <see cref="ReferencedSopItem"/> to locate in the <see cref="ReferencedSopItemCollection"/>.</param>
 /// <returns>
 /// The zero-based index of the first occurrence of value within the entire <see cref="ReferencedSopItemCollection"/>,
 /// if found; otherwise, -1.
 /// </returns>
 public int IndexOf(ReferencedSopItem value)
 {
     return(List.IndexOf(value));
 }
Esempio n. 13
0
 /// <summary>
 /// Adds an object to the end of the <see cref="ReferencedSopItemCollection"/>.
 /// </summary>
 /// <param name="value">The <see cref="ReferencedSopItem"/> to be added to the end of the <see cref="ReferencedSopItemCollection"/>.</param>
 /// <returns>The <see cref="ReferencedSopItemCollection"/> index at which the value has been added.</returns>
 public int Add(ReferencedSopItem value)
 {
     return(List.Add(value));
 }