comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Reading Multiple DICOM Files
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Reading Multiple DICOM Files [message #65561 is a reply to message #65560] Sun, 08 March 2009 17:17 Go to previous messageGo to previous message
Jye is currently offline  Jye
Messages: 17
Registered: May 2008
Junior Member
Hi Robbie and David,

I am currently reading the data into an array and this is where it
slowing down. Reading all of the files into an OBJARR is relatively
faster but this OBJARR must then have each objects image data read
individually eg I have not been able to do this;

Image_Data = oArray -> GetValue(REFERENCE = image_data_reference, /
no_copy)

Below is what Im currently using.

Cheers
Jye


PRO Example

folder = 'D:\Dynamic\' ;Folder containing all of the DICOM files
files = file_search(string(folder, '*.DCM'), COUNT=nfiles)

dicom_obj = obj_new('GDLffDICOM')
result = dicom_obj -> Read(files[0])

image_Acq_Time_reference = dicom_obj -> GetReference('0018'x,'1242'x)
image_reference = dicom_obj -> GetReference('7FE0'x,'0010'x)

obj_destroy, dicom_obj

for i = 0, nfiles-1 do begin

Slice_Number = i
dicom_obj = obj_new('GDLffDICOM')
result = dicom_obj -> Read(files[i])

image_Acq_Time = dicom_obj -> GetValue
(REFERENCE=image_Acq_Time_reference,/no_copy)
image_Acq_Time = *(image_Acq_Time[0])/1000.

if i eq 0 then Acq_Time = image_Acq_Time else Acq_Time = [Acq_Time,
image_Acq_Time]

image_slice = dicom_obj -> GetValue(REFERENCE=image_reference,/
no_copy)
image_slice = rotate(*(image_slice[0]), 7) / image_Acq_Time

if i eq 0 then All_Images = image_slice else All_Images =
[[[All_Images]], [[image_slice]]]

obj_destroy, dicom_obj

endfor

END
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Changing color of composite objects
Next Topic: Re: starting point of dashed lines

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:14:57 PDT 2025

Total time taken to generate the page: 0.00451 seconds