Пример #1
0
        private string GetTagName(UInt16 theGroupNumber, UInt16 theElementNumber, string theTag, PrivateCodeDictionary thePrivateCodeDictionary)
        {
            // Tag 'Item (FFFE,E000)'
            if (theTag.Equals("(FFFE,E000)"))
            {
                return("Item");
            }

            // Tag 'Item Delimitation Item (FFFE,E00D)'
            if (theTag.Equals("(FFFE,E00D)"))
            {
                return("Item Delimitation Item");
            }

            // Tag 'Sequence Delimitation Item (FFFE,E0DD)'
            if (theTag.Equals("(FFFE,E0DD)"))
            {
                return("Sequence Delimitation Item");
            }

            // For 'Even Group Number', DICOM attribute name has to come from public dictionary
            if ((theGroupNumber % 2) == 0)
            {
                return(PublicDICOMDictionary.GetTagName(theTag));
            }

            // For Tag 'Private Creator Code' return "Private Creator"
            if ((theGroupNumber % 2) == 1 && (theElementNumber <= 0xFF))
            {
                return("Private Creator");
            }

            // For 'Odd Group Number', DICOM attribute name has to come from private dictionary
            if ((theGroupNumber % 2) == 1)
            {
                return(thePrivateCodeDictionary.GetTagName(theTag));
            }

            // Should never be reached...
            return("???");
        }