AW: [Insight-users] accessing the HEADER of a DICOM file

jiang jiang at TI . Uni-Trier . DE
Fri, 19 Sep 2003 16:48:27 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_0017_01C37ECD.D9167930
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

Hi Evelyne,
Thank you very much for your code. It is a simple and easy to understand. In
order to test reading DICOM series files, I adapt it to the example QtITK.
However it still does not work. Every time it stops at reader->Update();
When I debug it, I get the error message "Unhandled exception of QtITK.exe:
0xC00000005: Access Violation"
I doubt that my ITK version is not correct. I use the cvs_root.tar at 27,
Aug. Could you tell me which version do you use?
How I hope this simple code can run!

Chunyan
  -----Ursprüngliche Nachricht-----
  Von: Evelyne Balteau [mailto:e . balteau at ulg . ac . be]
  Gesendet: Freitag, 12. September 2003 17:44
  An: jiang
  Cc: ITK
  Betreff: Re: [Insight-users] accessing the HEADER of a DICOM file


  Here you are !!
  That is just a simple adaptation from the itkDICOMImageSeriesTest (I am
just beginning with all that stuff, so it is supposed to be simple:-))
  I didn't change anything for the DICOM reader part... The test worked fine
!!
  For viewing you need to link the OpenGL and the FLTK libraries...

  Hope it helps...

  Anyway... I still have a problem about the DICOM headers...
  Has anyone an idea that could help me ????

  Evelyne

    ----- Original Message -----
    From: jiang
    To: Evelyne Balteau
    Cc: ITK
    Sent: Friday, September 12, 2003 5:09 PM
    Subject: AW: [Insight-users] accessing the HEADER of a DICOM file


    Hi Evelyne,
    You said your code based on itkDICOMImageSeriesTest can build a 3D
volume from a series of DICOM files...
    However I tried to do the same work as you but always failed. Can you
give me your code that I can learn how to build a 3D volume from a series of
DICOM files.
    Thank you very much!


    Chunyan
      -----Ursprüngliche Nachricht-----
      Von: insight-users-admin at itk . org
[mailto:insight-users-admin at itk . org]Im Auftrag von Evelyne Balteau
      Gesendet: Mittwoch, 10. September 2003 16:38
      An: insight-users at itk . org
      Betreff: [Insight-users] accessing the HEADER of a DICOM file


      Hello !

      I have written a code based on the GLSliceView.h header
(InsightApplications) and
      the itkDICOMImageSeriesTest, to view slices of a 3D volume from a
series of DICOM files...
      I successfully tested it on a wide range of (magnitude) images, but I
had some problems with phase data.
      I finally found the solution : the phase data are "rescaled" by
substracting 4096 and multiplying by 2 (keeping unsigned short type) !!!
      Well...
      To write a code that could take this into account WHEN REQUIRED (for
phase but not for magnitude images), I need to access the header of the
DICOM files.
      There are two fields (RescaleIntercept=-4096 and RescaleSlope=2) in
this header giving informations on the rescaling factors.
      I could read it with matlab, but I don't know how to do with ITK...
      Is there some method to do so ??

      Thanks for any help !!

      Evelyne

------=_NextPart_000_0017_01C37ECD.D9167930
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2716.2200" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><SPAN class=3D640473514-19092003><FONT face=3DArial color=3D#0000ff =
size=3D2>Hi=20
Evelyne,</FONT></SPAN></DIV>
<DIV><SPAN class=3D640473514-19092003><FONT face=3DArial color=3D#0000ff =
size=3D2>Thank=20
you very much for your code. It is a simple and easy to understand. In =
order to=20
test reading DICOM series files, I&nbsp;adapt it to the example QtITK. =
However=20
it still does not work. Every time it stops at reader-&gt;Update(); When =
I debug=20
it, I get the error message "Unhandled exception of QtITK.exe: =
0xC00000005:=20
Access Violation"</FONT></SPAN></DIV>
<DIV><SPAN class=3D640473514-19092003><FONT face=3DArial color=3D#0000ff =
size=3D2>I=20
doubt that my ITK version is not correct. I use the cvs_root.tar at 27,=20
Aug.&nbsp;Could you tell me which version do you =
use?</FONT></SPAN></DIV>
<DIV><SPAN class=3D640473514-19092003><FONT face=3DArial color=3D#0000ff =
size=3D2>How I=20
hope this simple code can run!</FONT></SPAN></DIV>
<DIV><SPAN class=3D640473514-19092003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D640473514-19092003><FONT face=3DArial color=3D#0000ff =

size=3D2>Chunyan</FONT></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
  size=3D2>-----Urspr=FCngliche Nachricht-----<BR><B>Von:</B> Evelyne =
Balteau=20
  [mailto:e . balteau at ulg . ac . be]<BR><B>Gesendet:</B> Freitag, 12. =
September 2003=20
  17:44<BR><B>An:</B> jiang<BR><B>Cc:</B> ITK<BR><B>Betreff:</B> Re:=20
  [Insight-users] accessing the HEADER of a DICOM =
file<BR><BR></FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>Here you are !!</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>That is just a simple adaptation from =
the=20
  itkDICOMImageSeriesTest (<FONT face=3DArial size=3D2>I am just =
beginning with all=20
  that stuff, so it is supposed to be simple:-))</FONT></FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>I didn't change anything for the =
DICOM reader=20
  part... The test worked fine !!</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>For viewing y</FONT><FONT =
face=3DArial size=3D2>ou=20
  need to link the OpenGL and the FLTK libraries...</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Hope it helps...</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Anyway... I still have a problem =
about the DICOM=20
  headers...</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>Has anyone an idea that could help me =

  ????</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Evelyne</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <BLOCKQUOTE dir=3Dltr=20
  style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
    <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
    <DIV=20
    style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
    <A title=3Djiang at TI . Uni-Trier . DE =
href=3D"mailto:jiang at TI . Uni-Trier . DE">jiang</A>=20
    </DIV>
    <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
title=3De . balteau at ulg . ac . be=20
    href=3D"mailto:e . balteau at ulg . ac . be">Evelyne Balteau</A> </DIV>
    <DIV style=3D"FONT: 10pt arial"><B>Cc:</B> <A =
title=3Dinsight-users at itk . org=20
    href=3D"mailto:insight-users at itk . org">ITK</A> </DIV>
    <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Friday, September 12, =
2003 5:09=20
    PM</DIV>
    <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> AW: [Insight-users] =
accessing=20
    the HEADER of a DICOM file</DIV>
    <DIV><FONT face=3DArial size=3D2></FONT><BR></DIV>
    <DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D453080615-12092003>Hi=20
    Evelyne,</SPAN></FONT></DIV>
    <DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
    class=3D453080615-12092003>You said your code based on =
itkDICOMImageSeriesTest=20
    can build a 3D volume from a series of DICOM =
files...</SPAN></FONT></DIV>
    <DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
    class=3D453080615-12092003>However I tried to do the same work as =
you but=20
    always failed. Can you give me your code that I can learn how to =
build a 3D=20
    volume from a series of DICOM files.</SPAN></FONT></DIV>
    <DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
    class=3D453080615-12092003>Thank you very much!</SPAN></FONT></DIV>
    <DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
    class=3D453080615-12092003></SPAN></FONT>&nbsp;</DIV>
    <DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
    class=3D453080615-12092003></SPAN></FONT>&nbsp;</DIV>
    <DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
    class=3D453080615-12092003>Chunyan</SPAN></FONT></DIV>
    <BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
      <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
      size=3D2>-----Urspr=FCngliche Nachricht-----<BR><B>Von:</B> <A=20
      =
href=3D"mailto:insight-users-admin at itk . org">insight-users-admin at itk . org</=
A>=20
      [mailto:insight-users-admin at itk . org]<B>Im Auftrag von </B>Evelyne=20
      Balteau<BR><B>Gesendet:</B> Mittwoch, 10. September 2003=20
      16:38<BR><B>An:</B> insight-users at itk . org<BR><B>Betreff:</B>=20
      [Insight-users] accessing the HEADER of a DICOM =
file<BR><BR></FONT></DIV>
      <DIV><FONT face=3DArial size=3D2>Hello !</FONT></DIV>
      <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
      <DIV><FONT face=3DArial size=3D2>I have written a code based on =
the=20
      GLSliceView.h header (InsightApplications) and </FONT></DIV>
      <DIV><FONT face=3DArial size=3D2>the itkDICOMImageSeriesTest, to =
view slices=20
      of a 3D volume from a series of DICOM files...</FONT></DIV>
      <DIV><FONT face=3DArial size=3D2>I successfully tested it on a =
wide range of=20
      (magnitude) images, but I had some problems with phase =
data.</FONT></DIV>
      <DIV><FONT face=3DArial size=3D2>I finally found the solution : =
the phase data=20
      are "rescaled" by substracting 4096 and multiplying by 2 (keeping =
unsigned=20
      short type) !!!</FONT></DIV>
      <DIV><FONT face=3DArial size=3D2>Well...</FONT></DIV>
      <DIV><FONT face=3DArial size=3D2>To write a code that could take =
this into=20
      account WHEN REQUIRED (for phase but not for magnitude images), I =
need to=20
      access the header of the DICOM files.</FONT></DIV>
      <DIV><FONT face=3DArial size=3D2>There are two fields =
(RescaleIntercept=3D-4096=20
      and RescaleSlope=3D2) in this header giving informations on the =
rescaling=20
      factors.</FONT></DIV>
      <DIV><FONT face=3DArial size=3D2>I could read it with matlab, but =
I don't know=20
      how to do with ITK...</FONT></DIV>
      <DIV><FONT face=3DArial size=3D2>Is there some method to do so =
??</FONT></DIV>
      <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
      <DIV><FONT face=3DArial size=3D2>Thanks for any help =
!!</FONT></DIV>
      <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
      <DIV><FONT face=3DArial=20
size=3D2>Evelyne</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BOD=
Y></HTML>

------=_NextPart_000_0017_01C37ECD.D9167930--