Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, March 17, 2011 8:32:15 AM(UTC)
samit1984

Groups: Registered
Posts: 33


hello
i want to develop a simple application which compaere all tag value of 2 dicom image and most important is comparing 2 image pixel value .

is there any example or function which directly compare pixel value .

basicaly for example i am compressing one dicom file with jpeg 2000 with compression ratio of let say 15 and then againg decompress it to raw dicom . so i wanted to compare orignal dicom and decompres dicom so to check how much data is lost or quality ..
thank you
samit
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Friday, March 18, 2011 6:33:45 AM(UTC)

Javed  
Javed

Groups: Registered
Posts: 11


You can extract the values stored in all DICOM tags using LEADTOOLS. Using the included C# DICOM Main Demo (\Examples\DotNet\CS\DicomDemo\) you can click on any DICOM tags present in the dataset to see the stored value and the element length. You can use the code to extract the element values for comparison.

For the size of uncompressed image stored in a DICOM file, you can look at Pixel Data element length and for multi-frame uncompressed images, you need to divide the length by Number of Frames (0028, 0008). You can also calculate the size by collecting the following information from DICOM file:

• Bit Allocated (0028:0100)
• Rows (0028, 0010)
• Columns (0028, 0011)
• Sample Per Pixel (0028:0002)

Using the information you can calculate the size like

Image Size in bytes = (Rows * Columns * (Bit Allocated/8)* sample Per Pixel

Compressed image size will require understanding of how compressed images are stored in DICOM dataset. You can read about encapsulated format encoding in PS 3.5 of the standard. Following information is from DICOM standard:

"The encapsulated pixel stream of encoded pixel data is segmented in one or more Fragments which convey their explicit length.” Again, “Depending on the transfer syntax, a frame may be entirely contained within a single fragment, or may span multiple fragments to support buffering during compression or to avoid exceeding the maximum size of a fixed length fragment."

In most cases, each frame of encapsulated image data is encapsulated in an ITEM (FFFE:E000) element under the pixel data element. The first ITEM is used for Frame Offset table and rest of the ITEM elements will contain the compressed frames. You can get the length of the Item to get the compressed frame size. Pixel Data Element length is -1 (FFFFFFFF) for Encapsulated format encoding.
Attach screen shot shows the compressed image frame size using C# Main DICOM demo.
Javed attached the following image(s):
Compressed_Image_size.jpg
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.123 seconds.