How DCM4CHEE stores the bits allocation information of DICOM image

混江龙づ霸主 提交于 2020-01-16 19:19:46

问题


We are using DCM4CHEE as replica of PACS server. I have 8 bit and 16 bit images spread across multiple studies. All the images are stored in DCM4CHEE.

We are running DICOM DUMP [DCM2TXT] on sample images to identify the bits allocation. It is a lengthy process.

Does DCM4CHEE server stores the bits representation in DB?, if so where can I find the information about the bits allocated?

Please help me in finding the best solution for this.

Thanks,

-Anil Kumar.C


回答1:


Yes, it is in the database and can be accessed very fast. In the database/schema 'pacsdb' the table name is 'instance', the column name is 'inst_attrs'. Most probably you will have to make a select with joins involving study and series tables, depending on how you search/present your data.

Now, the problem is, inst_attrs is a BLOB with binary data. Inside, you would need to look for the following hex string (from DICOM transfer syntax) 28 00 00 01 55 53 02 00 xx 00 Here, 28 00 00 01 is actually hex for (0028, 0100) tag (Bits Allocated), 55 53 02 00 says "Unsigned Short (US) 2 bytes long", and after that there is usually 10 00 for 16 bit or 08 00 for 8 bit images. So, you really only need the "xx" value from the bytes above.

Depending on the database access tools you will be using to get this data, you can choose the best strategy. It can be a web app (.war) deployed along side with dcm4chee, probably just a bunch of jsp's will be enough; it can be a separate java app or even .NET - the tool of choice really depends on where and for what do you need it. For web access I would rather do a full .ear with stateless session bean to fetch the data and small, password-protected web app to present the data and provide JSON / WS access from the outside.

Update Below is an SQL example (MySQL only) that returns study UID, series UID and bits allocated as 10 for 16-bit and 08 for 8-bit images:

SELECT study_iuid as StudyUID, series_iuid as SeriesUID,
    SUBSTRING(HEX(inst_attrs),
               LOCATE('2800000155530200',HEX(inst_attrs))+16
             ,2) as BitsAllocatedHex 
    FROM instance i JOIN series s ON i.series_fk=s.pk 
        JOIN study st ON s.study_fk=st.pk


来源:https://stackoverflow.com/questions/3923653/how-dcm4chee-stores-the-bits-allocation-information-of-dicom-image

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!