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