<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Jerome, I used your last suggestion...<br>My code is:<br><br>[...]<br>&nbsp;vtkImageChangeInformation* filter = vtkImageChangeInformation::New();<br><br>&nbsp; filter-&gt;SetInput(connector-&gt;GetOutput());<br>&nbsp; filter-&gt;SetOutputSpacing( VTK_DOUBLE_MAX,VTK_DOUBLE_MAX, 4.00 );&nbsp; // VTK_DOUBLE_MAX to save original x,y dimensions<br>&nbsp; // filter-&gt;SetOutputSpacing (1.00,1.00,10.00) ; // My previous solution<br>&nbsp; filter-&gt;Update();<br><br>[...]<br><br>Thanks a lot,<br>Daniela<br><br>&gt; Date: Wed, 2 Jun 2010 09:46:36 +0200<br>&gt; Subject: Re: [vtkusers] Problem with use of vtkImageChangeInformation::SetOutputSpacing()<br>&gt; From: jerome.velut@gmail.com<br>&gt; To: danysunflower@hotmail.it; vtkusers@vtk.org<br>&gt; <br>&gt; Daniela,<br>&gt; I forward to the VTK mailing list so that everybody knows that the<br>&gt; problem is solved. However, I am a bit curious: which solution did you<br>&gt; used?<br>&gt; <br>&gt; Best regards,<br>&gt; Jerome<br>&gt; <br>&gt; 2010/6/2 Daniela Sacchetto &lt;danysunflower@hotmail.it&gt;:<br>&gt; &gt; Thanks a lot!<br>&gt; &gt;<br>&gt; &gt; Your suggestions help me to solve my problem....<br>&gt; &gt;<br>&gt; &gt; Regards<br>&gt; &gt; Daniela<br>&gt; &gt;<br>&gt; &gt;&gt; Date: Tue, 1 Jun 2010 20:40:55 +0200<br>&gt; &gt;&gt; Subject: Re: [vtkusers] Problem with use of<br>&gt; &gt;&gt; vtkImageChangeInformation::SetOutputSpacing()<br>&gt; &gt;&gt; From: jerome.velut@gmail.com<br>&gt; &gt;&gt; To: emonson@cs.duke.edu<br>&gt; &gt;&gt; CC: danysunflower@hotmail.it; vtkusers@vtk.org<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Hi,<br>&gt; &gt;&gt; Another solution would be to set the two first arguments to<br>&gt; &gt;&gt; VTK_DOUBLE_MAX. By reading the code, it seems that it will keep the<br>&gt; &gt;&gt; input spacing:<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; file vtkImageChangeInformation<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; line 148: inInfo-&gt;Get(vtkDataObject::SPACING(), spacing);<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Then, a few line further, you find:<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; for (i = 0; i &lt; 3; i++)<br>&gt; &gt;&gt; {<br>&gt; &gt;&gt; if (this-&gt;OutputSpacing[i] != VTK_DOUBLE_MAX)<br>&gt; &gt;&gt; {<br>&gt; &gt;&gt; spacing[i] = this-&gt;OutputSpacing[i];<br>&gt; &gt;&gt; }<br>&gt; &gt;&gt; ...<br>&gt; &gt;&gt; }<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; line 188: outInfo-&gt;Set(vtkDataObject::SPACING(),spacing,3);<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; It has to be checked, but one again, I think that the command<br>&gt; &gt;&gt; changeInformationFilter-&gt;SetOutputSpacing( VTK_DOUBLE_MAX,<br>&gt; &gt;&gt; VTK_DOUBLE_MAX, myCustomZSpacing );<br>&gt; &gt;&gt; would do the trick.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; If not, Eric's solution is the one that simply work!<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; HTH<br>&gt; &gt;&gt; Jerome<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; 2010/6/1 Eric E. Monson &lt;emonson@cs.duke.edu&gt;:<br>&gt; &gt;&gt; &gt; Hey Daniela,<br>&gt; &gt;&gt; &gt; You should be able to get the original spacing of you image data in each<br>&gt; &gt;&gt; &gt; direction from the data itself with one of the GetSpacing() methods:<br>&gt; &gt;&gt; &gt; http://www.vtk.org/doc/nightly/html/classvtkImageData.html<br>&gt; &gt;&gt; &gt; -Eric<br>&gt; &gt;&gt; &gt; ------------------------------------------------------<br>&gt; &gt;&gt; &gt; Eric E Monson<br>&gt; &gt;&gt; &gt; Duke Visualization Technology Group<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; On Jun 1, 2010, at 11:49 AM, Daniela Sacchetto wrote:<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; Thanks Jerome for your advise but I not able to use this class.<br>&gt; &gt;&gt; &gt; I think that I have to use<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; vtkImageChangeInformation::SetOutputSpacing(float, float, float)<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; but I don't understand how to set float parametres to have the effect<br>&gt; &gt;&gt; &gt; desired: I want only change the slice distance, so I think that I have<br>&gt; &gt;&gt; &gt; to<br>&gt; &gt;&gt; &gt; set the value desired as third parameter between brackets, but I don't<br>&gt; &gt;&gt; &gt; know<br>&gt; &gt;&gt; &gt; how set the other....<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; Have anyone an example for me?<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; Regards<br>&gt; &gt;&gt; &gt; Daniela<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;&gt; Date: Tue, 1 Jun 2010 10:16:03 +0200<br>&gt; &gt;&gt; &gt;&gt; Subject: Re: [vtkusers] Filter to set the slice distance in a 3D<br>&gt; &gt;&gt; &gt;&gt; rendered<br>&gt; &gt;&gt; &gt;&gt; volume<br>&gt; &gt;&gt; &gt;&gt; From:&nbsp;jerome.velut@gmail.com<br>&gt; &gt;&gt; &gt;&gt; To:&nbsp;danysunflower@hotmail.it<br>&gt; &gt;&gt; &gt;&gt; CC:&nbsp;daviddoria+vtk@gmail.com;&nbsp;vtkusers@vtk.org<br>&gt; &gt;&gt; &gt;&gt;<br>&gt; &gt;&gt; &gt;&gt; Hi Daniela,<br>&gt; &gt;&gt; &gt;&gt;<br>&gt; &gt;&gt; &gt;&gt; I think you can use the vtkImageAppend filter together with the<br>&gt; &gt;&gt; &gt;&gt; vtkImageChangeInformation.<br>&gt; &gt;&gt; &gt;&gt;<br>&gt; &gt;&gt; &gt;&gt; HTH<br>&gt; &gt;&gt; &gt;&gt; Jerome<br>&gt; &gt;&gt; &gt;&gt;<br>&gt; &gt;&gt; &gt;&gt;<br>&gt; &gt;&gt; &gt;&gt; 2010/6/1 Daniela Sacchetto &lt;danysunflower@hotmail.it&gt;:<br>&gt; &gt;&gt; &gt;&gt; &gt; Ok, sorry,&nbsp; I'll try to explain in an other way...<br>&gt; &gt;&gt; &gt;&gt; &gt; I have a 3D rendered volume that is ok but its Z dimension is too<br>&gt; &gt;&gt; &gt;&gt; &gt; little....I would like to set the Z dimenmsion (for example setting<br>&gt; &gt;&gt; &gt;&gt; &gt; the<br>&gt; &gt;&gt; &gt;&gt; &gt; pixels or slices distance)...<br>&gt; &gt;&gt; &gt;&gt; &gt; I know that there is a Itk method (ImageType::SpacingType) that<br>&gt; &gt;&gt; &gt;&gt; &gt; allows<br>&gt; &gt;&gt; &gt;&gt; &gt; to<br>&gt; &gt;&gt; &gt;&gt; &gt; set the pixels distance....Is there a VTK method that allows to<br>&gt; &gt;&gt; &gt;&gt; &gt; render<br>&gt; &gt;&gt; &gt;&gt; &gt; my<br>&gt; &gt;&gt; &gt;&gt; &gt; image with a note distance in Z direction?<br>&gt; &gt;&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;&gt; &gt; I hope that now you could understand better my problem...<br>&gt; &gt;&gt; &gt;&gt; &gt; Regards<br>&gt; &gt;&gt; &gt;&gt; &gt; Daniela<br>&gt; &gt;&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; Date: Mon, 31 May 2010 17:22:38 -0400<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; Subject: Re: [vtkusers] Filter to set the slice distance in a 3D<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; rendered<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; volume<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; From:&nbsp;daviddoria+vtk@gmail.com<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; To:&nbsp;danysunflower@hotmail.it<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; CC:&nbsp;vtkusers@vtk.org<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; On Mon, May 31, 2010 at 5:08 PM, Daniela Sacchetto<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; &lt;danysunflower@hotmail.it&gt; wrote:<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; Hi everyone<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; I'm new in vtk and I'm trying to do a work for my thesis.<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; I have to improve a code that gives a 3D volume from 2D slices<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; (.jpg<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; or<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; other formats).<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; My code has to be improved because the 3D visualized with VTK (I'm<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; using<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; vtkVolumeRayCastCompositeFunction) is too "slim": I would like to<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; modifie<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; the Z dimension.<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; Have anyone found this problem yet? Could anyone suggest me a VTK<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; method<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; or<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; class that do something similar?<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; Regards<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; Daniela<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; I don't know what you mean by "slim". Can you give us a sample data<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; set or a screenshot of what you have and an explanation of what is<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; wrong?<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; You may want to look into the Marching Cubes algorithm:<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt;http://www.vtk.org/Wiki/VTK/Examples/Medical/GenerateModelsFromLabels<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; Good luck,<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>&gt; &gt;&gt; &gt;&gt; &gt;&gt; David<br>&gt; &gt;&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;&gt; &gt; ________________________________<br>&gt; &gt;&gt; &gt;&gt; &gt; Tanti account di posta? Unisci tutto sotto Hotmail<br>&gt; &gt;&gt; &gt;&gt; &gt; _______________________________________________<br>&gt; &gt;&gt; &gt;&gt; &gt; Powered by&nbsp;www.kitware.com<br>&gt; &gt;&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;&gt; &gt; Visit other Kitware open-source projects at<br>&gt; &gt;&gt; &gt;&gt; &gt;&nbsp;http://www.kitware.com/opensource/opensource.html<br>&gt; &gt;&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;&gt; &gt; Please keep messages on-topic and check the VTK FAQ at:<br>&gt; &gt;&gt; &gt;&gt; &gt;&nbsp;http://www.vtk.org/Wiki/VTK_FAQ<br>&gt; &gt;&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;&gt; &gt; Follow this link to subscribe/unsubscribe:<br>&gt; &gt;&gt; &gt;&gt; &gt;&nbsp;http://www.vtk.org/mailman/listinfo/vtkusers<br>&gt; &gt;&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; ________________________________<br>&gt; &gt;&gt; &gt; Avatar per Messenger e sfondo per il PC&nbsp;Creali<br>&gt; &gt;&gt; &gt; gratis!_______________________________________________<br>&gt; &gt;&gt; &gt; Powered by&nbsp;www.kitware.com<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; Visit other Kitware open-source projects<br>&gt; &gt;&gt; &gt; athttp://www.kitware.com/opensource/opensource.html<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; Please keep messages on-topic and check the VTK FAQ<br>&gt; &gt;&gt; &gt; at:http://www.vtk.org/Wiki/VTK_FAQ<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; Follow this link to subscribe/unsubscribe:<br>&gt; &gt;&gt; &gt; http://www.vtk.org/mailman/listinfo/vtkusers<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; ________________________________<br>&gt; &gt; Il tuo mondo MSN a portata di clic. Scarica IE8 per MSN<br>                                               <br /><hr />Il tuo mondo MSN a portata di clic.  <a href='http://events.it.msn.com/internet-explorer-8' target='_new'>Scarica IE8 per MSN</a></body>
</html>