[Insight-users] reading writing multiple dicom files
Luis Ibanez
luis.ibanez at kitware.com
Mon Jan 15 17:00:26 EST 2007
Hi Ashish,
You can reuse a reader for reading multiple
series from a directory.
It is however a common mistake to not initilize
the reader properly when it is set inside a for
loop.
Please post your code to the list so we can give
you more specific advice.
Also, please describe your goal more precisely.
In particular: are those 2D DICOM files or are
they multi-frame DICOM files ?
Are you trying to read 3D volumes that are stored
as a collection of 2D DICOM files ?, with multiple
volumes being stored in the same directory ?
BTW, please make sure that you put the Update()
call inside a try/catch block. It is very likely
that the reader is throwing an exception telling
you what the problem is, and you may not be seeing
this message. You will find many examples of how
to use a try/catch block in the ITK Software Guide.
Regards,
Luis
--------------------
Ashish Singh wrote:
> Hi,
>
> I am a newbie in ITK. I am writing a code which involves reading and
> writing multiple dicom files from a directory. These dicom files belong
> to separate series. I was using a single file reader example within a
> 'for' loop. But my code crashes when reader->update() is called the
> second time. Can anyone please tell me what am I doing wrong? And how to
> fix the problem?
> Is there any other way to read and write multiple dicom files. I already
> tried the imageseriesread and write, even that gives me error when there
> is only one dicom file from a particular series in my directory.
> What is the best way to do this? Is there any class/function that can do
> this for me? Please help.
>
> Thanks,
> Ashish
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list