<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=iso-8859-1">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @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:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
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:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
pre
        {mso-style-priority:99;
        mso-style-link:"Préformaté HTML Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.PrformatHTMLCar
        {mso-style-name:"Préformaté HTML Car";
        mso-style-priority:99;
        mso-style-link:"Préformaté HTML";
        font-family:Consolas;
        color:black;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
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 bgcolor=white lang=FR link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>You wrote an Image&nbsp;: </span><span lang=EN-US>vtkImageWriter::New()
writer.SetInput(dicomreader.GetOutput());
writer.SetFileName(&quot;/home/gururaj/eclipse
Project/SimpleVTK/SimpleVtk/CardiacCT/Gods.vtk&quot;);</span><span lang=EN-US
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>And the you try to read a polydata from the exact same file ? <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>The only thing stored in this file is an Image and it is pretty
obvious in the error message :<o:p></o:p></span></p>

<pre><span lang=EN-US>Input for connection index 0 on input port index 0 for algorithm vtkPolyDataWriter(0x8c1a3860) is of type vtkImageData, but a vtkPolyData is required.<o:p></o:p></span></pre>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>To display an Image as a surface, you have to add some filtering
operation (conversion or surface generation).<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>The VTK books enclose a lot of explanation and example about
case like this &#8230;<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>HTH<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Fred<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Cordialement,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>F.Danesi<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'>Responsable Développement Informatique et Travail Collaboratif<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Département DINCCS (Département Ingénierie Numérique, Conception
Collaborative et Simulation)<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>MICADO / DINCCS<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Pôle de Haute Technologie, BP 90005<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>08005 Charleville-Mézières Cedex<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Tel. : +33 (0) 3.24.41.69.55 / +33 (0) 6.62.76.13.32<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Email : <a href="mailto:frederic.danesi@dinccs.com">frederic.danesi@dinccs.com</a><o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Web : <a href="http://www.afmicado.com">www.afmicado.com</a> / <a
href="http://www.dinccs.com">www.dinccs.com</a><o:p></o:p></span></p>

</div>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";
color:windowtext'>De&nbsp;:</span></b><span style='font-size:10.0pt;font-family:
"Tahoma","sans-serif";color:windowtext'> vtkusers-bounces@vtk.org
[mailto:vtkusers-bounces@vtk.org] <b>De la part de</b> Gururajan<br>
<b>Envoyé&nbsp;:</b> mercredi 29 juillet 2009 20:33<br>
<b>À&nbsp;:</b> John Drescher<br>
<b>Cc&nbsp;:</b> VTK Users<br>
<b>Objet&nbsp;:</b> Re: [vtkusers] Please help me in viewing vtk<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Please see the attached my java file. that is the programme
i used to read dicom series and write .vtk file. To display in 3d format. but
am not able to view in 3d format. <br>
am getting following error <br>
<br>
<o:p></o:p></p>

<pre>vtkPolyDataReader (0x8cdda7e8): Unrecognized file type: <o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>vtkStreamingDemandDrivenPipeline (0x8c1a2018): Input for connection index 0 on input port index 0 for algorithm vtkPolyDataWriter(0x8c1a3860) is of type vtkImageData, but a vtkPolyData is required.<o:p></o:p></pre>

<p class=MsoNormal>Please have a look at my attached file<br>
<br>
Thanks<br>
Guru<br>
<br>
<br>
John Drescher wrote: <o:p></o:p></p>

<pre>On Wed, Jul 29, 2009 at 1:40 PM, Gururajan<a
href="mailto:gururajan.r@raster.in">&lt;gururajan.r@raster.in&gt;</a> wrote:<o:p></o:p></pre><pre>  <o:p></o:p></pre>

<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>The following i used for reading dicom series and creating .vtk files. But am not able to view that created .vtk file. Please any one can help me. the following error am getting *ERROR: In /home/juju/VTK5.0/VTK/IO/vtkDataReader.cxx, line 432 vtkPolyDataReader (0x8cdda7e8): Unrecognized file type: &nbsp;for file: /home/gururaj/eclipse Project/SimpleVTK/SimpleVtk/CardiacCT/Gods.vtk Thanks Guru vtkDICOMImageReader dicomreader = new vtkDICOMImageReader(); dicomreader.SetDirectoryName(&quot;/home/gururaj/MANIX/MANIX/CER-CT/ANGIO CT&quot;); dicomreader.Update(); System.out.println(&quot;File Dimension &quot; + dicomreader.GetFileDimensionality()); vtkImageWriter writer = new vtkImageWriter();//vtkImageWriter::New() writer.SetInput(dicomreader.GetOutput()); writer.SetFileName(&quot;/home/gururaj/eclipse Project/SimpleVTK/SimpleVtk/CardiacCT/Gods.vtk&quot;); writer.SetFileDimensionality(3); writer.Update(); writer.Write(); //3d Construction String strfilename = new String(); strfilename = &quot;/home/<o:p></o:p></pre><pre>gururaj/eclipse Project/SimpleVTK/SimpleVtk/CardiacCT/Gods.vtk&quot;; vtkPolyDataReader polyReader = new vtkPolyDataReader(); //vtkStructuredGridReader polyReader = new vtkStructuredGridReader(); polyReader.SetFileName(strfilename); polyReader.Update(); vtkPolyData polyData = new vtkPolyData(); polyData.DeepCopy(polyReader.GetOutput()); vtkPolyDataMapper polyMapper = new vtkPolyDataMapper(); polyMapper.SetInput(polyData); polyMapper.Update(); vtkActor actor = new vtkActor(); actor.SetMapper(polyMapper); actor.VisibilityOn(); vtkRenderer render = new vtkRenderer(); vtkRenderWindow renwindow = new vtkRenderWindow(); renwindow.AddRenderer(render); vtkRenderWindowInteractor renintec = new vtkRenderWindowInteractor(); renintec.SetRenderWindow(renwindow); render.AddActor(actor); render.SetBackground(0.2,0.3,0); renwindow.BordersOff(); renwindow.SetSize(500, 500); renwindow.Render(); render.ResetCamera(); renintec.Start(); _______________________________________________ Powered by <a
href="http://www.kitware.com">www.kitware.com</a> Visit other Kitware open-source projects at <a
href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a> Please keep messages on-topic and check the VTK FAQ at: <a
href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a> Follow this link to subscribe/unsubscribe: <a
href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><o:p></o:p></pre><pre>    <o:p></o:p></pre></blockquote>

<pre><o:p>&nbsp;</o:p></pre><pre>Please fix your posts. They are totally unreadable in this format.<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>  <o:p></o:p></pre>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:windowtext'>Analyse
effectuée par AVG - www.avg.fr<br>
Version: 8.5.375 / Base de données virale: 270.13.35/2269 - Date: 07/28/09
17:58:00</span><span style='color:windowtext'><o:p></o:p></span></p>

</div>

</body>

</html>