Greetings,
I am currently trying to learn some Java programming. To do this I’m trying to make something actually useful. Because I’m studying Medical Imaging, I though I would write my own Dicom Api in Java.
Part of the Dicom Standard is a Data Dictionary containing attributes used in Dicom Files. These attributes have to following properties.
(Group,Element) Description
For example:
(0x0002,0x0000) Length
(0x0002,0x0002) MediaStoredSOPClassUID
(0x0002,0x0010) TransferSyntaxUID
(0x0003,0x0003) Length
I was wondering how I should implement these in my API. The options I have thought of are:
- Enum, problem with that is that unique attributes could have the same description.
enum Attributes{
Length(0x0002,0x0000),
Length(0x0003,0x0000,
}
- A static class with just some constants containing the properties. Also the problem with the names excists.
- A xml file containing this data.
I really would like to use xml for this, because of the tabularity of the data and easy access. But is there any way I can include this in my Api.
~Timo Willemsen
a map will work best for you, define a class that will hold a dicom entry :
also create a map that will hold all the entries
after reading each line from your dictionary file into an entry class object
deadd it the mapsince the combination of group and element is unique you wound have any collisions