Mercurial > hg > orthanc-wsi
comparison Resources/Orthanc/Core/Enumerations.cpp @ 131:3112e5edb8b6
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 24 Mar 2018 11:30:05 +0100 |
parents | 4f3945a2b725 |
children |
comparison
equal
deleted
inserted
replaced
130:4f3945a2b725 | 131:3112e5edb8b6 |
---|---|
876 throw OrthancException(ErrorCode_ParameterOutOfRange); | 876 throw OrthancException(ErrorCode_ParameterOutOfRange); |
877 } | 877 } |
878 } | 878 } |
879 | 879 |
880 | 880 |
881 const char* EnumerationToString(ValueRepresentation vr) | |
882 { | |
883 switch (vr) | |
884 { | |
885 case ValueRepresentation_ApplicationEntity: // AE | |
886 return "AE"; | |
887 | |
888 case ValueRepresentation_AgeString: // AS | |
889 return "AS"; | |
890 | |
891 case ValueRepresentation_AttributeTag: // AT (2 x uint16_t) | |
892 return "AT"; | |
893 | |
894 case ValueRepresentation_CodeString: // CS | |
895 return "CS"; | |
896 | |
897 case ValueRepresentation_Date: // DA | |
898 return "DA"; | |
899 | |
900 case ValueRepresentation_DecimalString: // DS | |
901 return "DS"; | |
902 | |
903 case ValueRepresentation_DateTime: // DT | |
904 return "DT"; | |
905 | |
906 case ValueRepresentation_FloatingPointSingle: // FL (float) | |
907 return "FL"; | |
908 | |
909 case ValueRepresentation_FloatingPointDouble: // FD (double) | |
910 return "FD"; | |
911 | |
912 case ValueRepresentation_IntegerString: // IS | |
913 return "IS"; | |
914 | |
915 case ValueRepresentation_LongString: // LO | |
916 return "LO"; | |
917 | |
918 case ValueRepresentation_LongText: // LT | |
919 return "LT"; | |
920 | |
921 case ValueRepresentation_OtherByte: // OB | |
922 return "OB"; | |
923 | |
924 case ValueRepresentation_OtherDouble: // OD | |
925 return "OD"; | |
926 | |
927 case ValueRepresentation_OtherFloat: // OF | |
928 return "OF"; | |
929 | |
930 case ValueRepresentation_OtherLong: // OL | |
931 return "OL"; | |
932 | |
933 case ValueRepresentation_OtherWord: // OW | |
934 return "OW"; | |
935 | |
936 case ValueRepresentation_PersonName: // PN | |
937 return "PN"; | |
938 | |
939 case ValueRepresentation_ShortString: // SH | |
940 return "SH"; | |
941 | |
942 case ValueRepresentation_SignedLong: // SL (int32_t) | |
943 return "SL"; | |
944 | |
945 case ValueRepresentation_Sequence: // SQ | |
946 return "SQ"; | |
947 | |
948 case ValueRepresentation_SignedShort: // SS (int16_t) | |
949 return "SS"; | |
950 | |
951 case ValueRepresentation_ShortText: // ST | |
952 return "ST"; | |
953 | |
954 case ValueRepresentation_Time: // TM | |
955 return "TM"; | |
956 | |
957 case ValueRepresentation_UnlimitedCharacters: // UC | |
958 return "UC"; | |
959 | |
960 case ValueRepresentation_UniqueIdentifier: // UI (UID) | |
961 return "UI"; | |
962 | |
963 case ValueRepresentation_UnsignedLong: // UL (uint32_t) | |
964 return "UL"; | |
965 | |
966 case ValueRepresentation_Unknown: // UN | |
967 return "UN"; | |
968 | |
969 case ValueRepresentation_UniversalResource: // UR (URI or URL) | |
970 return "UR"; | |
971 | |
972 case ValueRepresentation_UnsignedShort: // US (uint16_t) | |
973 return "US"; | |
974 | |
975 case ValueRepresentation_UnlimitedText: // UT | |
976 return "UT"; | |
977 | |
978 case ValueRepresentation_NotSupported: | |
979 return "Not supported"; | |
980 | |
981 default: | |
982 throw OrthancException(ErrorCode_ParameterOutOfRange); | |
983 } | |
984 } | |
985 | |
986 | |
881 Encoding StringToEncoding(const char* encoding) | 987 Encoding StringToEncoding(const char* encoding) |
882 { | 988 { |
883 std::string s(encoding); | 989 std::string s(encoding); |
884 Toolbox::ToUpperCase(s); | 990 Toolbox::ToUpperCase(s); |
885 | 991 |