<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">hello,<br>thak you for your help,<br>with some changes it works like you've mentionned!<br><br>thanks!<br><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Message d'origine ----<br>De : Michael Knopke <Michael.Knopke@gmx.de><br>À : vtkusers@vtk.org<br>Envoyé le : Vendredi, 2 Février 2007, 10h35mn 26s<br>Objet : [vtkusers] vtkContourFilters<br><br><div>Hi,<br>If you have your data already, this shouldn't be hard. <br>Just build vtkImageData from it and feed it to the filter:<br><br><br> vtkImageData *imageData =
vtkImageData::New();<br><br> imageData->SetScalarTypeToUnsignedChar();<br> imageData->SetSpacing(3.2, 3.2, 20); // use correct spacing here<br> imageData->SetOrigin(0.,0.,0.); //<br> imageData->SetNumberOfScalarComponents(1); //depends on your data<br> imageData->SetDimensions(512,512,58); set correct dimension<br> imageData->AllocateScalars();<br><br> unsigned char *ptrData = (unsigned char*)imageData->GetScalarPointer();<br><br> for (int x=0; x<512; x++)<br> for (int y=0; y<512; y++)<br> for (int z=0; z<58;
z++)<br> {<br> *ptrData++ = x+y+z; // fill in the array here<br> }<br><br>Then just connect this to your ContourFilter->SetInput(imageData);<br>This should work.<br><br>Michael<br>-- <br>Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! <br>Ideal für Modem und ISDN: <a target="_blank" href="http://www.gmx.net/de/go/smartsurfer">http://www.gmx.net/de/go/smartsurfer</a><br>_______________________________________________<br>This is the private VTK discussion list. <br>Please keep messages on-topic. Check the FAQ at: <a target="_blank" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a target="_blank"
href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></div></div><br></div></div><br>
                <hr size="1">
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur <a href="http://fr.rd.yahoo.com/evt=42054/*http://fr.answers.yahoo.com">Yahoo! Questions/Réponses</a>.</body></html>