<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Hello Luis,<br><br>&nbsp;&nbsp; Thank you again for your reply. I have a few more questions based on your reply. <br>1. I use Dicom CT images. The 30 odd slices are read as a dicom series as 'sighed short'&nbsp; &nbsp; using the program DicomSeriesReadImageWrite.cxx &nbsp;  in the ITK examples with appropriate modifications for CT modality. The single 3D file that is output is '.mha'. This is 'unsigned char'. Hence, my deformableRegistration program uses 'unsigned char' as the pixel type.<br><br>Am I doing something wrong here ?<br><br>2. Does ITK, by default take the lower 8 bits when doing a type cast ?<br><br>3. How does ITK handle all the conversions once the user decides that he wants to read in dicom slices
 but output jpg slices instead ?<br><br>Please let me know.<br><br>Thank you,<br>Emma<br><br><br>&nbsp;<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Luis Ibanez &lt;luis.ibanez@kitware.com&gt;<br>To: Emma Ryan &lt;eryanvtk@yahoo.com&gt;<br>Cc: Insight Users &lt;insight-users@itk.org&gt;<br>Sent: Saturday, August 4, 2007 6:05:19 PM<br>Subject: Re: [Insight-users] DeformableRegistration7.cxx gives worse results<br><br><div><br>Hi Emma,<br><br><br>1) Thanks for uploading the "Before/After" images.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;You seem to have a pixel type problem.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;The images are probably 16-bits in its original form,<br>&nbsp;&nbsp;&nbsp;&nbsp;and in the code you are loading them in 8bits (unsigned char)<br>&nbsp;&nbsp;&nbsp;&nbsp;pixel type. You end up with the lower bits of the actual image.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;You *MUST* start by
 fixing the pixel type problem.<br>&nbsp;&nbsp;&nbsp;&nbsp;No registration method will work by feeding it with the<br>&nbsp;&nbsp;&nbsp;&nbsp;noisy lower bits of the pixel values.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;If your image is from a CT scan, you probably should use<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typedef&nbsp;&nbsp;&nbsp;&nbsp;signed short&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PixelType;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;instead of<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typedef&nbsp;&nbsp;&nbsp;&nbsp;unsigned char&nbsp;&nbsp;&nbsp;&nbsp; PixelType;<br><br><br><br>2) Yes, the bulk transform is available.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;Please, please, please if you report an error, be kind<br>&nbsp;&nbsp;&nbsp;&nbsp;and include the *EXACT* error message in your email.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;Just saying that the program gives you an error,<br>&nbsp;&nbsp;&nbsp;&nbsp;doesn't help us
 much.<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Did it failed to compile ?<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Did it failed to link ?<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Did the program crash ?<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Did it throw an exception ?<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp; Please let us know what error message you get.<br><br><br>3) Thanks for posting the code.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Please start by changing the PixelType.<br><br><br>4) If you continue experiencing problems,<br>&nbsp;&nbsp;&nbsp;&nbsp;it will be useful if you upload the Fixed and Moving<br>&nbsp;&nbsp;&nbsp;&nbsp;images that you are trying to register.<br><br><br><br>&nbsp;&nbsp; Thanks<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Luis<br><br><br><br>---------------<br>Emma Ryan
 wrote:<br>&gt; Hello Luis,<br>&gt; <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Just wondering if you got the images I uploaded to the server ?<br>&gt;&nbsp;&nbsp;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;I had another question about bulk transform.&nbsp;&nbsp;Is it really available <br>&gt; ?&nbsp;&nbsp;As I mentioned earlier, I see it in the header file, but when I try <br>&gt; to use in in my program it gives an error.<br>&gt; <br>&gt;&nbsp;&nbsp;I am also appending my program so you can have a better idea of what I <br>&gt; am doing.&nbsp;&nbsp;It is essentially the same as deformableRegistration7.cxx. <br>&gt; The only difference is a few minor additions for output, like the time, <br>&gt; checkerboard images and deformation vector output in x, y, z format.<br>&gt; <br>&gt; Emma<br>&gt; <br>&gt; <br></div></div><br></div></div><br>
      <hr size=1>Sick sense of humor? Visit Yahoo! TV's 
<a href="http://us.rd.yahoo.com/evt=47093/*http://tv.yahoo.com/collections/222">Comedy with an Edge </a>to see what's on, when. 


</body></html>