<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi all,<br>
<br>
Jean-Pierre ROUX a écrit :
<blockquote cite="midv04210101bf002e3967af@%5B134.214.195.163%5D"
type="cite">At 9:14 +0200 17/07/05, Luca Picello wrote:
<br>
<blockquote type="cite">It's wonderful JP. I'd really like to help
you more on writing the sources but I may need some more docs.
<br>
About my latest problem here a screenshort where you can understand it
well.
<br>
Here I rendered the volume with VTK but as you can see the X axis for
this patient is swapped left with right.
<br>
<br>
Information from one slice:
<br>
<br>
Patient Position : HFS.
<br>
Patient Orientation : L\P.
<br>
</blockquote>
<br>
OK, I see the pb.
<br>
It probabely comes from the 'orientation convention' in Dicom.
<br>
If you 'cut a slice' (i.e; make an image) out of the patient, lying on
his back,
<br>
the result will look different whether you're standing near the
patient's feet, or near the patient's head.
<br>
<br>
We never toke this information into account in gdcm, till now.
<br>
(Too many troubles with reading 'exotic' images ...)
<br>
We considered it was up to the user to decide *where* he must place the
camera, in VTK, for instance.
<br>
<br>
I think we should add a method to gdcm::SerieHelper to allow user to
tell whether he wants gdcm to take 'position' and 'orientation' into
account (that will cause some overhead), or if he wants to keep the
images as there are.
<br>
<br>
I guess there are some heuristics to 'discover', before writting the
code.
<br>
I'm going to ask to our friends from THERALYS, I'm almost sure they
*had* to do the job, maybe in C++, or in Python.
<br>
<br>
</blockquote>
We had to do this work, JP is right. our heuristic is based both on
Image Position Patient (0x0020, 0x0032) and Image Orientation Patient
(0x0020, 0x0037) fields. <br>
I didn't do it myself, a large part of the work was conducted by
Eduardo Davila who works now for creatis (I believe ?).<br>
The outcome of our algorithm is an "Orientation type" that can be
Axial(feet to head), Axial invert (head to feet), Coronal, Coronal
invert, etc ...<br>
<br>
I'll have a look at the code to see if I can give you some useful
hints. It has been writen in Python.<br>
<br>
Please note that we didn't have time to test this heuristic extensively
on all DICOM images we are working with. So it *may* not work with some
images .<br>
<br>
<blockquote cite="midv04210101bf002e3967af@%5B134.214.195.163%5D"
type="cite">==> Emmanuel, are you on holydays ?
<br>
Or still reading the mails?
<br>
<br>
</blockquote>
I'm there, no holidays for me until september (maybe ...) ;) <br>
<br>
Manu<br>
<blockquote cite="midv04210101bf002e3967af@%5B134.214.195.163%5D"
type="cite">JPRx
<br>
<br>
<blockquote type="cite"><br>
If you need it for testing pourposes, let me know.
<br>
Thanks,
<br>
<br>
Luca
<br>
<br>
<br>
<br>
Jean-Pierre ROUX wrote:
<br>
<br>
<blockquote type="cite">At 13:58 +0200 16/07/05, Luca Picello
wrote:
<br>
<br>
<blockquote type="cite"><br>
Hello everybody again,
<br>
I wonder if with vtkGdcmReader I can read images with correct axial
acquisition order.
<br>
I observe I have right swapped with left in my image datas...
<br>
it's really nasty and I feel it's similar to yesterday's reported issue
<br>
we do need absolutely SerieHelper in vtkGdcmReader asap :-(
<br>
</blockquote>
<br>
<br>
Hi, everybody.
<br>
<br>
I just finished testing a new feature for vtkGdcmReader.
<br>
<br>
<blockquote type="cite"><br>
</blockquote>
<br>
We can now :
<br>
<br>
gdcmSerieHelper *sh = new gdcmSerieHelper();
<br>
sh->SetDirectory(myImageDirectory, true);
<br>
gdcmFileList *l = s->GetFirstCoherentFileList();
<br>
s->OrderFileList(l);
<br>
<br>
vtkGdcmReader *gr = new vtkGdcmReader();
<br>
gr->SetCoherentFileList(l);
<br>
<br>
This works with a directory that contains only one 'Serie' (same Serie
UID for all the images).
<br>
If it contains more than one serie, you'll have to loop on the Series,
using
<br>
GetNextCoherentFileList();
<br>
<br>
(That's why gdcm::SerieHelper is used outside of vtkGdcmReader, not
inside)
<br>
<br>
PS :
<br>
OrderFileList orders the images :
<br>
- on the 'Image Position Patient'
<br>
if it's not found or if there are more than one image at the same
position,
<br>
- on Image Number
<br>
if image numbers are not coherent,
<br>
- on the file names :-(
<br>
We can easyly add more sorting conditions.
<br>
<br>
I'll commit it soon.
<br>
<br>
I don't understand the pb with write/left swapping in images ?
<br>
<br>
Jean-Pierre
<br>
<br>
<br>
<blockquote type="cite"><br>
luca
<br>
<br>
<br>
<br>
_______________________________________________
<br>
Dcmlib mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Dcmlib@creatis.insa-lyon.fr">Dcmlib@creatis.insa-lyon.fr</a>
<br>
<a class="moz-txt-link-freetext" href="http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib">http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib</a>
<br>
</blockquote>
<br>
<br>
Jean-Pierre ROUX
<br>
CREATIS - CNRS UMR 5515, INSERM U 630
<br>
Laboratoire de Radiologie Experimentale
<br>
Hopital Cardiologique
<br>
28 Avenue du Doyen LEPINE
<br>
B.P. Lyon-Montchat
<br>
69394 Lyon Cedex 03
<br>
<br>
Tel : (+33) 04 72 35 74 12
<br>
Fax : (+33) 04 72 68 49 16
<br>
URL : <a class="moz-txt-link-freetext" href="http://www.creatis.univ-lyon1.fr">http://www.creatis.univ-lyon1.fr</a>
<br>
e-mail : <a class="moz-txt-link-abbreviated" href="mailto:jpr@creatis.univ-lyon1.fr">jpr@creatis.univ-lyon1.fr</a>
<br>
.
<br>
<br>
</blockquote>
<br>
<br>
Attachment converted: HD 9.2:swapped-volume.JPG (JPEG/JVWR) (00018A6E)
<br>
</blockquote>
<br>
Jean-Pierre ROUX
<br>
CREATIS - CNRS UMR 5515, INSERM U 630
<br>
Laboratoire de Radiologie Experimentale
<br>
Hopital Cardiologique
<br>
28 Avenue du Doyen LEPINE
<br>
B.P. Lyon-Montchat
<br>
69394 Lyon Cedex 03
<br>
<br>
Tel : (+33) 04 72 35 74 12
<br>
Fax : (+33) 04 72 68 49 16
<br>
URL : <a class="moz-txt-link-freetext" href="http://www.creatis.univ-lyon1.fr">http://www.creatis.univ-lyon1.fr</a>
<br>
e-mail : <a class="moz-txt-link-abbreviated" href="mailto:jpr@creatis.univ-lyon1.fr">jpr@creatis.univ-lyon1.fr</a>
<br>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<div style="font-family: sans;">Emmanuel OLART, IT Manager<br>
<b>THERALYS</b><br>
Diagnostic & Therapeutic Image Analysis in Clinical Trials
<br>
<br>
Address : Bioparc, 60 av. Rockefeller, 69008 Lyon, France<br>
+33 (0)4 26 23 05 05 (Phone)<br>
+33 (0)4 26 23 05 06 (Fax)<br>
Email : <a href="mailto:eolart@theralys.com">eolart@theralys.com</a><br>
<a href="http://www.theralys.com/" title="Theralys.com"><img
src="cid:part1.00090503.04030801@theralys.com" alt="THERALYS"
title="THERALYS" border="0" height="24" width="150"></a>
</div>
</div>
</body>
</html>