karpagarajan / mdcm

Automatically exported from code.google.com/p/mdcm
0 stars 0 forks source link

Need Int type inside Dicom.Data.DcmDataset.LoadDicomFieldValue for NumberOfStudyRelatedInstances #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Do a C-Find and try to get either NumberOfStudyRelatedSeries or
NumberOfStudyRelatedInstances - they will return zero

What is the expected output? What do you see instead?
The numbers should not be zero

What version of the product are you using? On what operating system?
.9.5 on Windows, compiling in VS C# Express 2008

Please provide any additional information below.

Okay, I think I found a minor bug inside
Dicom.Data.DcmDataset.LoadDicomFieldValue. In the block starting around like
875, it checks if vtype matches several types, but there is no check for an
Int32 (which is my NumberOfStudyRelatedInstances).  So I added this:

                      } else if (vtype == typeof(Int32)) {
                           string temp = elem.GetValueString();
                           return System.Convert.ToInt32(temp, 10);

around line 884.  Works.  :-)

Best Regards,
Aerik 

Original issue reported on code.google.com by asyl...@gmail.com on 8 May 2008 at 10:53

GoogleCodeExporter commented 8 years ago
Fixed(?) in SVN

Original comment by colby.di...@gmail.com on 23 Jul 2008 at 11:57