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 : Friday, September 24, 2010 6:03:24 PM(UTC)

kyjjun  
kyjjun

Groups: Registered
Posts: 3


I have a problem in developing a DICOM viewer using LEADTOOLS 17.0.

I successfully could get DICOM voxel information using TAG_PIXEL_DATA.

And I can get x- and y-spacing (actual dimension) of DICOM CT data by using TAG_PIXEL_SPACING.


The problem is that retrieving z-spacing of DICOM data with TAG_SPACING_BETWEEN_SLICES.

The return value is always NULL for every DICOM sample data.

I found another tag - TAG_SLICE_THICKNESS -, but it gives a wrong z-slicing value.
The proper value can be checked with my VTK source code.


Does anyone who knows about this problem?

I put my code snippet below, and attached the source code of my function.

Thank you.


/////////////////////////////////////////
// Silce thickness
pElement = pDataSet->FindFirstElement( NULL, TAG_SLICE_THICKNESS, FALSE );
L_DOUBLE* pSliceThickness = NULL;
if( pElement != NULL )
{
pSliceThickness = pDataSet->GetDoubleValue( pElement, 0, 0 );
m_sliceThickness = pSliceThickness[0];
}

// Spacing between slices
pElement = pDataSet->FindFirstElement( NULL, TAG_SPACING_BETWEEN_SLICES, FALSE );
L_DOUBLE* pSpacingBetweenSlices = NULL;
if( pElement != NULL ) // --> Always NULL !!!!
{
pSpacingBetweenSlices = pDataSet->GetDoubleValue( pElement, 0, 0 );
m_sliceThickness = pSpacingBetweenSlices[0];
}
File Attachment(s):
LUserDicomDir_OnInsertDicomFile().txt (4kb) downloaded 99 time(s).
 

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 : Wednesday, September 29, 2010 6:13:22 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)


Please answer the following questions:
1. Do you face this problem with LEADTOOLS sample images?
2. Did you try to load the image into our DICOM Dataset demo? Did you get the correct value for the elements? If you get incorrect results using this demo, can you please send me sample images?

If you get correct results using the demo, please put your code in a small sample project (NOT you full application) and send it to me in a ZIP or RAR file. You can post it here or send it to support@leadtools.com and mention this forum post.
 
#3 Posted : Sunday, October 3, 2010 5:22:43 AM(UTC)

kyjjun  
kyjjun

Groups: Registered
Posts: 3


Here are the replies for your questions.

1. Do you face this problem with LEADTOOLS sample images?
--> I found no LEADTOOLS sample images of 3D volume data (series of slice images). So I could not check the Z-spacing value with LEADTOOLS sample images.

2. Did you try to load the image into our DICOM Dataset demo?
--> I modified the DICOM Dataset demo "DicomDir", and modified the source code of "LUserDicomDir" class in the sample project of LEADTOOLS.

Did you get the correct value for the elements?
--> I had found that VTK library (other library) gives correct value regarding Z-spacing. But the source code using LEADTOOLS gives only incorrect results. I attach the sample images at this posting. The correct value is 0.5 but I get 1.0 with TAG_SPACING_BETWEEN_SLICES.

And I sent you the code snippet that I am trying to use. As I wrote above, it is a part of "LUserDicomDir" class in the sample project of "DicomDir" of LEADTOOLS.

p.s. Currently, I am using the tag of "TAG_IMAGE_POSITION_PATIENT" to retrieve the z-spacing. It gives correct values. It is OK but I want to know why "TAG_SPACING_BETWEEN_SLICES" does not work properly.
 
#4 Posted : Sunday, October 3, 2010 5:29:11 AM(UTC)

kyjjun  
kyjjun

Groups: Registered
Posts: 3


I attach my sample images here.
File Attachment(s):
sample CT images (2).zip (2,626kb) downloaded 100 time(s).
 
#5 Posted : Monday, October 4, 2010 4:48:43 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

The data sets you sent do not contain the TAG_SPACING_BETWEEN_SLICES in any of them.

About our sample data sets, they get downloaded when you run our Main 3D demo for the first time and answer "yes" to the question about downloading them.

 
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.149 seconds.