<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="cid:filelist.xml@01C2655C.AD09EA60">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:HyphenationZone>14</w:HyphenationZone>
<w:EnvelopeVis/>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;
        text-underline:single;}
span.StileMessaggioDiPostaElettronica17
        {mso-style-type:personal-compose;
        mso-style-noshow:yes;
        mso-ansi-font-size:10.0pt;
        mso-bidi-font-size:10.0pt;
        font-family:Arial;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:windowtext;}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
span.GramE
        {mso-style-name:"";
        mso-gram-e:yes;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 2.0cm 2.0cm;
        mso-header-margin:36.0pt;
        mso-footer-margin:36.0pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
        {mso-style-name:"Tabella normale";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]-->
</head>
<body lang=IT link=blue vlink=purple style='tab-interval:35.4pt'>
<div class=Section1>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
class=SpellE><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>Hello</span></font></span><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'> <span
class=SpellE>for</span> all.<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>I
<span class=SpellE>have</span> a <span class=SpellE>problem</span> :<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
class=GramE><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>I <span class=SpellE>must</span> <span class=SpellE>read</span>
a "n" <span class=SpellE>number</span> of <span class=SpellE>imaging</span>
<span class=SpellE>pgm</span>, in way <span class=SpellE>to</span> <span
class=SpellE>recostruct</span> a volume</span></font></span><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>.
So <span class=GramE>i</span> <span class=SpellE>use</span> the <span
class=SpellE>calss</span> <span class=SpellE>vtkPNMReader</span> <span
class=SpellE>when</span> i <span class=SpellE>load</span> the <span
class=SpellE>images</span>, after i <span class=SpellE>don'</span>t <span
class=SpellE>have</span> <span class=SpellE>succes</span> <span class=SpellE>for</span>
<span class=SpellE>visualizing</span>. So i <span class=SpellE>write</span> the
code <span class=SpellE>wtring</span> <span class=SpellE>from</span> me: In the
first <span class=SpellE>section</span> i <span class=SpellE>build</span> a
"n" <span class=SpellE>number</span> of <span class=SpellE>imaging</span>
<span class=SpellE>pgm</span> <span class=SpellE>for</span> <span class=SpellE>rappresentig</span>
a <span class=SpellE>cube</span><span class=GramE>,</span>the first and the <span
class=SpellE>last</span> <span class=SpellE>imaging</span> <span class=SpellE>have</span>
the <span class=SpellE>point</span> <span class=SpellE>all</span> ugual <span
class=SpellE>to</span> zero. In the <span class=SpellE>second</span> <span
class=SpellE>section</span> <span class=SpellE>there</span> <span class=SpellE>is</span>
the <span class=SpellE>codde</span> <span class=SpellE>for</span> <span
class=SpellE>load</span> and <span class=SpellE>visualize</span> the <span
class=SpellE>imaging</span> <span class=GramE>so</span> i <span class=SpellE>will</span>
<span class=SpellE>explane</span> the <span class=SpellE>second</span> <span
class=SpellE>section</span> <span class=SpellE>for</span> <span class=SpellE>visualize</span>
the <span class=SpellE>imaging</span> in 3D, the class <span class=SpellE>vtkPNMReader</span>
return a volume <span class=SpellE>if</span> the <span class=SpellE>imaging</span>
<span class=SpellE>sequences</span> <span class=SpellE>is</span> more <span
class=SpellE>that</span> one <span class=SpellE>imaging</span>,<span
class=SpellE>but</span> <span class=SpellE>idon'</span>t <span class=SpellE>have</span>
success <span class=SpellE>when</span> i <span class=SpellE>visualize</span> <span
class=SpellE>this</span>. <span class=SpellE>Exactly</span> <span class=GramE>i</span>
<span class=SpellE>haven'</span>t <span class=SpellE>eb</span> error <span
class=SpellE>but</span> i <span class=SpellE>don'</span>t <span class=SpellE>see</span>
<span class=SpellE>anything</span> in the video, <span class=SpellE>only</span>
the background. <span class=SpellE>Thankyou</span> <span class=SpellE>for</span>
all.<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>PS:
in <span class=SpellE>this</span> code i assume <span class=SpellE>that</span> <span
class=SpellE>you</span> <span class=SpellE>have</span> <span class=SpellE>created</span>
8 <span class=SpellE>imaging</span> 16x16 <span class=SpellE>See</span> <span
class=SpellE>SetDataExtend</span>, <span class=SpellE>if</span> <span
class=SpellE>you</span> can <span class=SpellE>explain</span> the <span
class=SpellE>parameter</span> of <span class=SpellE>this</span> <span
class=SpellE>metod</span> <span class=GramE>i</span> <span class=SpellE>am</span>
happy.<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>#include
"<span class=SpellE>stdafx.h</span>"<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>#include
"<span class=SpellE>stdio.h</span>"<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>#include
"<span class=SpellE>string.h</span>"<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>#include
"<span class=SpellE>stdlib.h</span>"<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>#include
"<span class=SpellE>vtkActor.h</span>"<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>#include
"<span class=SpellE>vtkRenderer.h</span>"<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>#include
"<span class=SpellE>vtkRenderWindow.h</span>"<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>#include
"<span class=SpellE>vtkRenderWindowInteractor.h</span>"<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>#include
"<span class=SpellE>vtkPNMReader.h</span>"<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>#include
"<span class=SpellE>vtkDataSetMapper.h</span>"<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>#include
"<span class=SpellE>vtkPolyDataMapper.h</span>"<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>#include
"<span class=SpellE>vtkImageViewer.h</span>"<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>#include
"<span class=SpellE>vtkContourFilter.h</span>"<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
class=SpellE><span class=GramE><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>int</span></font></span></span><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>
<span class=SpellE>main</span>(<span class=SpellE>int</span> <span
class=SpellE>argc</span>, <span class=SpellE>char</span>* <span class=SpellE>argv</span>[])<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>{<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span>/<span class=GramE>***Creazione</span>
Immagini pgm****/<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>int</span></span>
<span class=SpellE>numimm</span>;<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span>FILE *<span class=SpellE>pgm</span>;<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>printf</span></span>("<span
class=SpellE>Insert</span> the <span class=SpellE>number</span> of <span
class=SpellE>imaging</span> <span class=SpellE>that</span> <span class=SpellE>you</span>
<span class=SpellE>want</span> <span class=SpellE>to</span> <span class=SpellE>build</span>:
");<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>scanf</span></span>("%d",
&<span class=SpellE>numimm</span>);<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>int</span></span>
<span class=SpellE>dimx</span>;<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>int</span></span>
<span class=SpellE>dimy</span>;<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>printf</span></span>("<span
class=SpellE>Insert</span> the <span class=SpellE>dimension</span> x: ");<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>scanf</span></span>("%d",
&<span class=SpellE>dimx</span>);<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>printf</span></span>("<span
class=SpellE>Insert</span> the <span class=SpellE>dimension</span> y: ");<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>scanf</span></span>("%d",
&<span class=SpellE>dimy</span>);<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>int</span></span>
i;<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>char</span></span>
file[6];<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>for</span></span>
(i=0; i<<span class=SpellE>numimm</span>; i++)<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span>{<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:2'> </span><span class=SpellE><span
class=GramE>char</span></span> <span class=SpellE>nomefile</span>[80]="";<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:2'> </span><span class=SpellE><span
class=GramE>strcpy</span></span>(<span class=SpellE>nomefile</span>,"<span
class=SpellE>immagine.pgm</span>.");<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:2'> </span>_<span class=SpellE>itoa</span>(<span
class=GramE>i,file</span>,10);<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:2'> </span><span class=SpellE><span
class=GramE>strcat</span></span>(<span class=SpellE>nomefile</span>,file);<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:2'> </span><span class=SpellE><span
class=GramE>pgm=fopen</span></span>(<span class=SpellE>nomefile</span>,"<span
class=SpellE>w+</span>");<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:2'> </span><span class=SpellE><span
class=GramE>fprintf</span></span>(<span class=SpellE>pgm</span>,"P2\n");<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:2'> </span><span class=SpellE><span
class=GramE>fprintf</span></span>(<span class=SpellE>pgm</span>,"#<span
class=SpellE>Created</span> <span class=SpellE>from</span> <span class=SpellE>Vicio\n</span>");<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:2'> </span><span class=SpellE><span
class=GramE>fprintf</span></span>(<span class=SpellE>pgm</span>,"%d %<span
class=SpellE>d\n</span>",<span class=SpellE>dimx</span>,<span
class=SpellE>dimy</span>);<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:2'> </span><span class=SpellE><span
class=GramE>fprintf</span></span>(<span class=SpellE>pgm</span>,"255\n");<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:2'> </span><span class=SpellE><span
class=GramE>if</span></span>((i==0) || (i==numimm-1))<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:2'> </span>{<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:3'> </span><span class=SpellE><span
class=GramE>int</span></span> <span class=SpellE>contx</span>;<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:3'> </span><span class=SpellE><span
class=GramE>int</span></span> <span class=SpellE>conty</span>;<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:3'> </span><span class=SpellE><span
class=GramE>for</span></span> (conty=1 ;<span class=SpellE>conty</span><=<span
class=SpellE>dimy</span>; conty++)<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:3'> </span>{<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:4'> </span><span class=SpellE><span
class=GramE>for</span></span>(contx=1; <span class=SpellE>contx</span><=<span
class=SpellE>dimx</span>; contx++)<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:4'> </span>{<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:5'> </span><span class=SpellE><span
class=GramE>fprintf</span></span>(<span class=SpellE>pgm</span>,"0
");<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:4'> </span>}<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:4'> </span><span class=SpellE><span
class=GramE>fprintf</span></span>(<span class=SpellE>pgm</span>,"\n");<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:3'> </span>}<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:2'> </span>}<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:2'> </span>else <o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:2'> </span>{<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:3'> </span><span class=SpellE><span
class=GramE>int</span></span> <span class=SpellE>contx</span>;<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:3'> </span><span class=SpellE><span
class=GramE>int</span></span> <span class=SpellE>conty</span>;<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:3'> </span><span class=SpellE><span
class=GramE>for</span></span>(conty=1; <span class=SpellE>conty</span><=<span
class=SpellE>dimy</span>; conty++)<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:3'> </span>{<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:4'> </span><span class=SpellE><span
class=GramE>for</span></span>(contx=1; <span class=SpellE>contx</span><=<span
class=SpellE>dimx</span>; contx++)<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:4'> </span>{<span style='mso-tab-count:
1'> </span><o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:5'> </span><span class=SpellE><span
class=GramE>if</span></span> ((conty==4 ||conty==5 || conty==6) &&
(contx==4 || contx==5 || contx==6))<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:5'> </span>{<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:5'> </span><span class=SpellE><span
class=GramE>fprintf</span></span>(<span class=SpellE>pgm</span>,"255
");<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:5'> </span>}<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:5'> </span><span class=GramE>else</span>
<span class=SpellE>fprintf</span>(<span class=SpellE>pgm</span>,"0
");<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:4'> </span>}<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:4'> </span><span class=SpellE><span
class=GramE>fprintf</span></span>(<span class=SpellE>pgm</span>,"\n");<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:3'> </span>}<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:2'> </span>}<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span>}<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>fclose</span></span>(<span
class=SpellE>pgm</span>);<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>vtkRenderer</span></span>
*ren1 = <span class=SpellE>vtkRenderer</span>::New();<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>vtkRenderWindow</span></span>
*<span class=SpellE>renWin</span> = <span class=SpellE>vtkRenderWindow</span>::New();<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>vtkRenderWindowInteractor</span></span>
*<span class=SpellE>iren</span> = <span class=SpellE>vtkRenderWindowInteractor</span>::New();<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>vtkActor</span></span>
*<span class=SpellE>aVoxelActor</span> = <span class=SpellE>vtkActor</span>::New();<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>vtkPNMReader</span></span>
*immagini = <span class=SpellE>vtkPNMReader</span>::New();<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>vtkDataSetMapper</span></span>
*<span class=SpellE>aVoxelMapper</span> = <span class=SpellE>vtkDataSetMapper</span>::New();<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>vtkPolyDataMapper</span></span>
*grigio = <span class=SpellE>vtkPolyDataMapper</span>::New();<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=GramE>immagini-</span>><span
class=SpellE>SetDataExtent</span>(0,7,0,7,0,7);<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=GramE>immagini-</span>><span
class=SpellE>SetFilePrefix</span>("c:\\esempivtk\\immaginiPgm\\immagine.pgm");<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=GramE>immagini-</span>><span
class=SpellE>SetDataMask</span>(0x7fff); <o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>aVoxelMapper-</span></span>><span
class=SpellE>SetInput</span>(immagini-><span class=SpellE>GetOutput</span>());<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>aVoxelActor-</span></span>><span
class=SpellE>SetMapper</span>(<span class=SpellE>aVoxelMapper</span>);<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>aVoxelActor-</span></span>><span
class=SpellE>GetProperty</span>()-><span class=SpellE>SetColor</span>(1,0,0);<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>renWin-</span></span>><span
class=SpellE>AddRenderer</span>(ren1);<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>renWin-</span></span>><span
class=SpellE>SetSize</span>(300,150);<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>iren-</span></span>><span
class=SpellE>SetRenderWindow</span>(<span class=SpellE>renWin</span>);<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=GramE>ren1-</span>><span
class=SpellE>SetBackground</span>(0.1,0.2,0.4);<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=GramE>ren1-</span>><span
class=SpellE>AddActor</span>(<span class=SpellE>aVoxelActor</span>);<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>renWin-</span></span>>Render();<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><span
style='mso-tab-count:1'> </span><span class=SpellE><span class=GramE>iren-</span></span>>Start();<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
</div>
</body>
</html>