[Insight-users] reading 512x 512 ct dicom images

Miller, James V (Research) millerjv at crd.ge.com
Tue, 27 Apr 2004 11:29:51 -0400


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C42C6C.7B9DAA77
Content-Type: text/plain

We read full CT image series with the DICOMSeriesFilenames all the time.  If
the directory contains multiple image series, then the DICOMSeriesFilenames
will return the images in the first series it finds (by default). The first
series in a directory is frequently a scout series and not what you what to
process.  However, you can tell the DICOMSeriesFilenames to get the
filenames for a particular series (specified by UID).
 
The size of the images is determined from the DICOM headers.
 
If you run the DicomSeriesReadImageWriter example specifying a directory of
DICOM files, it will list all the series UIDs in the that directory (and
read the first series it finds by default). Then you can run the example a
second time specifying the series UID that you want. We could probably
change the example to have an option to just list the series UIDs and the
number of files in each series (without reading the first series by
default).
 
If none of this information helps you solve your problem, then we'll need a
couple of the DICOM CT images to track down the problem.  We probably do not
need the entire volume, just 2 or 3 slices from the series you want.  You
can send them to me.
 
Jim
 
 

-----Original Message-----
From: raghu venkatram [mailto:raghu_420 at hotmail.com]
Sent: Tuesday, April 27, 2004 10:05 AM
To: luis.ibanez at kitware.com
Cc: insight-users at itk.org
Subject: Re: [Insight-users] reading 512x 512 ct dicom images



hello Luis,

Using the dicom series reader example, and trying to read 512 x 512 ct
images. I tried using a directory that contained multiple series and also
just one. In both cases only the first 2 slices are read. There is not
"crash", the program terminates.

I set up the example so that I read my dicom images and write them at in
Analyze format. using 256 x 256 MR slices, my analyze image contains all the
slices.

I also tried getting the spacing information, I get the right spacing for
the MR volume as in its header, while i get 1,1,1 for the CT slices. I
double checked to make sure i wasnt doing something silly. 

Apart from this, I have used MRICro to convert my MR and CT volumes into
Analyze format, and my ITK registration application works just fine. So I
thought instead of converting why not just use DICOM as is through ITK and
ran into the CT reading problem.

A colleague of mine, says he had to change hard coded image height and width
from 256 to 512 in one of the itk files, which i dont believe is right as
this information in all fairness must be dynamically obtained from the image
header. I could give you my ct volume, if you would like to test them out.
Also please tell me that the image dimensions are not hardcoded.

Thank you,

Raghu



>From: Luis Ibanez <luis.ibanez at kitware.com> 
>To: raghu venkatram <raghu_420 at hotmail.com> 
>CC: insight-users at itk.org 
>Subject: Re: [Insight-users] reading 512x 512 ct dicom images 
>Date: Mon, 26 Apr 2004 13:10:03 -0400 
> 
> 
>Hi Raghu, 
> 
>In the case of the CT images that only write 2 slices... 
> 
>Could you please be more specific regarding the action 
>of the executable: 
> 
>You said: 
> 
>    1) It crashes 
>    2) The name generator gives all the dicom files 
>    3) When you write the volume only 2 slices appear 
> 
>Maybe you could post the text output from the program 
>so we can see the order in which things happened. 
>Crashes is a very generic term. It could have been a 
>segmentation fault, a catched exception or an uncatched 
>exception... Again, if you post the text output of the 
>program, that will help us to figure out what is happening. 
> 
> 
>   Thanks, 
> 
> 
>      Luis 
> 
> 
> 
>---------------------- 
>raghu venkatram wrote: 
> 
>>hi Luis, 
>>  I have looked at teh dicomseriesreader example. and while using 
>>the example, and trying to write out my ct volume, it crashes, the 
>>name generator gives me all the names of the dicom files in the 
>>directory, but when i write it out it writes out only 2 slices. 
>>  I have tried the the same program with a 256 x 256 mr volume, and 
>>i am able to write it out. Now i am able to read both my MR and CT 
>>volumes using MRICro and AMIDE with no problems, also i am able to 
>>convert them into ANALYZE format using MRICro and use it in my ITK 
>>program. 
>>  Also when i try getting the spacing information of my CT volume 
>>after reading the image, i get 1,1,1 instad of .5 .5 2, but i get 
>>the right spacing information for my MR volume using the 
>>dicomseriesreader example. 
>>  please also not that MRICro and AMIDE both give the rght spacing 
>>for both CT and MR volumes and the right spacing. 
>>  Thanks for the continued support 
>>Raghu 
>> 
>> 
> 
> 
> 
>_______________________________________________ 
>Insight-users mailing list 
>Insight-users at itk.org 
>http://www.itk.org/mailman/listinfo/insight-users 

  _____  

Lose those love handles! MSN  <http://g.msn.com/8HMBENUS/2743??PS=> Fitness
shows you two moves to slim your waist.
_______________________________________________ Insight-users mailing list
Insight-users at itk.org http://www.itk.org/mailman/listinfo/insight-users


------_=_NextPart_001_01C42C6C.7B9DAA77
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">


<META content="MSHTML 6.00.2800.1276" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=183330115-27042004><FONT color=#0000ff size=2>We read full CT 
image series with the DICOMSeriesFilenames all the time.&nbsp; If the directory 
contains multiple image series, then the DICOMSeriesFilenames will return the 
images in the first series it finds (by default).&nbsp;The first series in a 
directory is frequently a scout series and not what you what to process.&nbsp; 
However, you can tell the DICOMSeriesFilenames to get the filenames for a 
particular series (specified by UID).</FONT></SPAN></DIV>
<DIV><SPAN class=183330115-27042004><FONT color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=183330115-27042004><FONT color=#0000ff size=2>The size of the 
images is determined from the DICOM headers.</FONT></SPAN></DIV>
<DIV><SPAN class=183330115-27042004><FONT color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=183330115-27042004><FONT color=#0000ff size=2>If you run the 
DicomSeriesReadImageWriter example specifying a directory of DICOM files, it 
will list all the series UIDs in the that directory (and read the first series 
it finds by default). Then you can run the example a second time specifying the 
series UID that you want. We could probably change the example to have an option 
to just list the series UIDs and the number of files in each series (without 
reading the first series by default).</FONT></SPAN></DIV>
<DIV><SPAN class=183330115-27042004><FONT color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=183330115-27042004><FONT color=#0000ff size=2>If none of this 
information helps you solve your problem, then we'll need a couple of the DICOM 
CT images to track down the problem.&nbsp; We probably do not need the entire 
volume, just 2 or 3 slices from the series you want.&nbsp; You can send them to 
me.</FONT></SPAN></DIV>
<DIV><SPAN class=183330115-27042004><FONT color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=183330115-27042004><FONT color=#0000ff 
size=2>Jim</FONT></SPAN></DIV>
<DIV><SPAN class=183330115-27042004><FONT color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=183330115-27042004><FONT color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<BLOCKQUOTE>
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> raghu venkatram 
  [mailto:raghu_420 at hotmail.com]<BR><B>Sent:</B> Tuesday, April 27, 2004 10:05 
  AM<BR><B>To:</B> luis.ibanez at kitware.com<BR><B>Cc:</B> 
  insight-users at itk.org<BR><B>Subject:</B> Re: [Insight-users] reading 512x 512 
  ct dicom images<BR><BR></FONT></DIV>
  <DIV>
  <DIV class=RTE>
  <P>hello Luis,</P>
  <P>Using the dicom series reader example, and trying to read 512 x 512 ct 
  images. I tried using a directory that contained multiple series and also just 
  one. In both cases only the first 2 slices are read. There is not "crash", the 
  program terminates.</P>
  <P>I set up the example so that I read my dicom images and write them at in 
  Analyze format. using 256 x 256 MR slices, my analyze image contains all the 
  slices.</P>
  <P>I also tried getting the spacing information, I get the right spacing for 
  the MR volume as in its header, while i get 1,1,1 for the CT slices. I double 
  checked to make sure i wasnt doing something silly. </P>
  <P>Apart from this, I have used MRICro to convert my MR and CT volumes into 
  Analyze format, and my ITK registration application works just fine. So I 
  thought instead of converting why not just use DICOM as is through ITK and ran 
  into the CT reading problem.</P>
  <P>A colleague of mine, says he had to change hard coded image height and 
  width from 256 to 512 in one of the itk files, which i dont believe is right 
  as this information in all fairness must be dynamically obtained from the 
  image header. I could give you my ct volume, if you would like to test them 
  out. Also please tell me that the image dimensions are not hardcoded.</P>
  <P>Thank you,</P>
  <P>Raghu<BR><BR></P></DIV>
  <DIV></DIV>&gt;From: Luis Ibanez &lt;luis.ibanez at kitware.com&gt; 
  <DIV></DIV>&gt;To: raghu venkatram &lt;raghu_420 at hotmail.com&gt; 
  <DIV></DIV>&gt;CC: insight-users at itk.org 
  <DIV></DIV>&gt;Subject: Re: [Insight-users] reading 512x 512 ct dicom images 
  <DIV></DIV>&gt;Date: Mon, 26 Apr 2004 13:10:03 -0400 
  <DIV></DIV>&gt; 
  <DIV></DIV>&gt; 
  <DIV></DIV>&gt;Hi Raghu, 
  <DIV></DIV>&gt; 
  <DIV></DIV>&gt;In the case of the CT images that only write 2 slices... 
  <DIV></DIV>&gt; 
  <DIV></DIV>&gt;Could you please be more specific regarding the action 
  <DIV></DIV>&gt;of the executable: 
  <DIV></DIV>&gt; 
  <DIV></DIV>&gt;You said: 
  <DIV></DIV>&gt; 
  <DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;1) It crashes 
  <DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;2) The name generator gives all the 
  dicom files 
  <DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;3) When you write the volume only 2 
  slices appear 
  <DIV></DIV>&gt; 
  <DIV></DIV>&gt;Maybe you could post the text output from the program 
  <DIV></DIV>&gt;so we can see the order in which things happened. 
  <DIV></DIV>&gt;Crashes is a very generic term. It could have been a 
  <DIV></DIV>&gt;segmentation fault, a catched exception or an uncatched 
  <DIV></DIV>&gt;exception... Again, if you post the text output of the 
  <DIV></DIV>&gt;program, that will help us to figure out what is happening. 
  <DIV></DIV>&gt; 
  <DIV></DIV>&gt; 
  <DIV></DIV>&gt;&nbsp;&nbsp; Thanks, 
  <DIV></DIV>&gt; 
  <DIV></DIV>&gt; 
  <DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Luis 
  <DIV></DIV>&gt; 
  <DIV></DIV>&gt; 
  <DIV></DIV>&gt; 
  <DIV></DIV>&gt;---------------------- 
  <DIV></DIV>&gt;raghu venkatram wrote: 
  <DIV></DIV>&gt; 
  <DIV></DIV>&gt;&gt;hi Luis, 
  <DIV></DIV>&gt;&gt;&nbsp;&nbsp;I have looked at teh dicomseriesreader example. 
  and while using 
  <DIV></DIV>&gt;&gt;the example, and trying to write out my ct volume, it 
  crashes, the 
  <DIV></DIV>&gt;&gt;name generator gives me all the names of the dicom files in 
  the 
  <DIV></DIV>&gt;&gt;directory, but when i write it out it writes out only 2 
  slices. 
  <DIV></DIV>&gt;&gt;&nbsp;&nbsp;I have tried the the same program with a 256 x 
  256 mr volume, and 
  <DIV></DIV>&gt;&gt;i am able to write it out. Now i am able to read both my MR 
  and CT 
  <DIV></DIV>&gt;&gt;volumes using MRICro and AMIDE with no problems, also i am 
  able to 
  <DIV></DIV>&gt;&gt;convert them into ANALYZE format using MRICro and use it in 
  my ITK 
  <DIV></DIV>&gt;&gt;program. 
  <DIV></DIV>&gt;&gt;&nbsp;&nbsp;Also when i try getting the spacing information 
  of my CT volume 
  <DIV></DIV>&gt;&gt;after reading the image, i get 1,1,1 instad of .5 .5 2, but 
  i get 
  <DIV></DIV>&gt;&gt;the right spacing information for my MR volume using the 
  <DIV></DIV>&gt;&gt;dicomseriesreader example. 
  <DIV></DIV>&gt;&gt;&nbsp;&nbsp;please also not that MRICro and AMIDE both give 
  the rght spacing 
  <DIV></DIV>&gt;&gt;for both CT and MR volumes and the right spacing. 
  <DIV></DIV>&gt;&gt;&nbsp;&nbsp;Thanks for the continued support 
  <DIV></DIV>&gt;&gt;Raghu 
  <DIV></DIV>&gt;&gt; 
  <DIV></DIV>&gt;&gt; 
  <DIV></DIV>&gt; 
  <DIV></DIV>&gt; 
  <DIV></DIV>&gt; 
  <DIV></DIV>&gt;_______________________________________________ 
  <DIV></DIV>&gt;Insight-users mailing list 
  <DIV></DIV>&gt;Insight-users at itk.org 
  <DIV></DIV>&gt;http://www.itk.org/mailman/listinfo/insight-users 
  <DIV></DIV></DIV><BR clear=all>
  <HR>
  <A href="http://g.msn.com/8HMBENUS/2743??PS=">Lose those love handles! MSN 
  Fitness shows you two moves to slim your waist.</A> 
  _______________________________________________ Insight-users mailing list 
  Insight-users at itk.org 
http://www.itk.org/mailman/listinfo/insight-users</BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C42C6C.7B9DAA77--