[vtkusers]ask how to read DICOM(again)

Shekhar Chandra Shekhar.Chandra at sci.monash.edu.au
Sun Oct 7 21:32:59 EDT 2007


Hi,

I dont think u want read the header manually. DICOM files are very 
vendor specific. Even major libraries have trouble reading various versions.

You could also look into GDCM library, which specifically contains a VTK 
based Reader class (like vtkPNGReader etc.). This might do what u want. 
It is easily built using cmake and is small (you dont need any library 
except VTK).

<http://www.creatis.insa-lyon.fr/Public/Gdcm>

Cheers
Shekhar

m26404030 at john.petra.ac.id wrote:
> thanx for ur answer again, but i am not allowed to use many libraries in my
> project..i think i must use VTK only for the helping library.
> 
> anyone can show me how to get the data such as patient age manually by reading
> the .dcm files in C++?
> 
> FILE *myfile=fopen("image.dcm","r+b");
> ..
> ..
> ..
> 
> i dont understand the data structure of .dcm files..
> i have read several references but i still dont understand it. maybe someone can
> give me the example code in C++ how to do it..
> 
> 
> 
> i need it very much..
> 
> thanx a lot..
> 
> 
> Best regards..
> 
> 
> Quoting Mark Wyszomierski <markww at gmail.com>:
> 
>> My impression is that VTK is NOT a specialized DICOM support toolkit,
>> it's strength is in rendering data, it doesn't care where you get it
>> from. Why not try one of the libraries specifically made for handling
>> DICOM files? I put a simple example here of using dcmtk:
>>
>>
>> http://devsample.org/index.php?option=com_content&task=view&id=45&Itemid=29
>>
>>
>> Mark
>>
>>
>> On 10/6/07, m26404030 at john.petra.ac.id <m26404030 at john.petra.ac.id> wrote:
>>>
>>> hi all, i want to extract some informations in DICOM image such as patient
>> age,
>>> patient sex, modality, etc..
>>> i have tried to use vtkDICOMImageReader, but i cant get what i want since
>>> vtkDICOMImageReader only have the GetPatientName() function? what must i do
>> if
>>> i want to get the patient age, sex, modality, etc?
>>>
>>> can VTK do this or should i read the image file manually(read the header or
>>> something)?maybe someone can give me information about dicom file format
>> and
>>> how to extract the informations above??
>>>
>>>
>>>
>>> Plis help me..
>>>
>>>
>>> thanx a lot..
>>> _______________________________________________
>>> This is the private VTK discussion list.
>>> Please keep messages on-topic. Check the FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
> 
> 
> 
> 
> Quoting Mark Wyszomierski <markww at gmail.com>:
> 
>> My impression is that VTK is NOT a specialized DICOM support toolkit,
>> it's strength is in rendering data, it doesn't care where you get it
>> from. Why not try one of the libraries specifically made for handling
>> DICOM files? I put a simple example here of using dcmtk:
>>
>>
>> http://devsample.org/index.php?option=com_content&task=view&id=45&Itemid=29
>>
>>
>> Mark
>>
>>
>> On 10/6/07, m26404030 at john.petra.ac.id <m26404030 at john.petra.ac.id> wrote:
>>>
>>> hi all, i want to extract some informations in DICOM image such as patient
>> age,
>>> patient sex, modality, etc..
>>> i have tried to use vtkDICOMImageReader, but i cant get what i want since
>>> vtkDICOMImageReader only have the GetPatientName() function? what must i do
>> if
>>> i want to get the patient age, sex, modality, etc?
>>>
>>> can VTK do this or should i read the image file manually(read the header or
>>> something)?maybe someone can give me information about dicom file format
>> and
>>> how to extract the informations above??
>>>
>>>
>>>
>>> Plis help me..
>>>
>>>
>>> thanx a lot..
>>> _______________________________________________
>>> This is the private VTK discussion list.
>>> Please keep messages on-topic. Check the FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
> 
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Shekhar.Chandra.vcf
Type: text/x-vcard
Size: 261 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20071008/ac191911/attachment.vcf>


More information about the vtkusers mailing list