<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>No sure why you want to write out in vtk format. If you just
want to visualize the image, check the example in the <o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>InsightApplications<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Auxiliary/vtk/itkReadITKImageShowVTK.cxx<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>-Jinzhong<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Yili Pan
[mailto:pyl0420@gmail.com] <br>
<b>Sent:</b> Tuesday, August 11, 2009 4:30 PM<br>
<b>To:</b> Yang, Jinzhong<br>
<b>Cc:</b> insight-users@itk.org<br>
<b>Subject:</b> Re: [Insight-users] Convert dicom to raw<o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Hi,<o:p></o:p></p>
<div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>I've already convert the dicom volume to .raw format using
MRIconvert. The next step is to write it in .vtk format. Is there any way to
realize that??<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>Thank you Jinzhong ^ ^<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>and thanks in advance<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>Best,<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>Yili<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
<div>
<p class=MsoNormal>On Tue, Aug 11, 2009 at 3:14 PM, Yang, Jinzhong <<a
href="mailto:jinzhong76@gmail.com">jinzhong76@gmail.com</a>> wrote:<o:p></o:p></p>
<div>
<div>
<p><span style='font-size:11.0pt;color:#1F497D'>Basically what you need is the
DICOM image decoder. If your image is stored in a series of files, you will
need ImageSeriesReader. Here is an example you may try:</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New";
color:blue'> typedef</span><span style='font-size:9.0pt;font-family:"Courier New"'>
itk::ImageSeriesReader< ImageType > ReaderType;</span><o:p></o:p></p>
<p style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'>
<span style='color:blue'>typedef</span>
itk::DICOMImageIO2
ImageIOType;</span><o:p></o:p></p>
<p><span style='font-size:9.0pt;font-family:"Courier New"'> <span
style='color:blue'>typedef</span>
itk::DICOMSeriesFileNames
SeriesFileNames;</span><o:p></o:p></p>
<p style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'>
</span><o:p></o:p></p>
<p style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'>
ImageIOType::Pointer gdcmIO = ImageIOType::New();</span><o:p></o:p></p>
<p style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'>
SeriesFileNames::Pointer series = SeriesFileNames::New();</span><o:p></o:p></p>
<p style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'>
series->SetDirectory(<directory name storing dicom files>);</span><o:p></o:p></p>
<p style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'> </span><o:p></o:p></p>
<p style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'>
ReaderType::Pointer reader = ReaderType::New();</span><o:p></o:p></p>
<p style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'>
<span style='color:blue'>const</span> ReaderType::FileNamesContainer &
filenames = series->GetFileNames();</span><o:p></o:p></p>
<p style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'>
reader->SetFileNames(filenames);</span><o:p></o:p></p>
<p><span style='font-size:9.0pt;font-family:"Courier New"'>
reader->SetImageIO(gdcmIO);</span><o:p></o:p></p>
<p><span style='font-size:9.0pt;font-family:"Courier New"'>
reader->Update();</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>Good luck,</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>-Jinzhong</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p><b><span style='font-size:10.0pt'>From:</span></b><span style='font-size:
10.0pt'> <a href="mailto:insight-users-bounces@itk.org" target="_blank">insight-users-bounces@itk.org</a>
[mailto:<a href="mailto:insight-users-bounces@itk.org" target="_blank">insight-users-bounces@itk.org</a>]
<b>On Behalf Of </b>Yili Pan<br>
<b>Sent:</b> Monday, August 10, 2009 12:13 PM<br>
<b>To:</b> <a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a><br>
<b>Subject:</b> [Insight-users] Convert dicom to raw</span><o:p></o:p></p>
</div>
<div>
<div>
<p> <o:p></o:p></p>
<p>Hi all ITK Gurus:<o:p></o:p></p>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p>I am trying to render dicom volume, but it seems that I have to convert the
files to raw format first. How can I do that?<o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p>Is there any advice to render the dicom volume?<o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p>Thanks ^ ^<o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p>Best,<o:p></o:p></p>
</div>
<div>
<p>Yili Pan<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>