<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
Thanks David,<div><br></div><div>This looks suitable.</div><div><br></div><div>I have a follow up question (actually two). Firstly, is it possible to label the different scalars in a vtkImageData? And secondly, some of my quantities are vectors, can I also associate vectors with a regular grid like this or would a different data structure be more appropriate?</div><div><br></div><div>Cheers,</div><div>Dan</div><div><br><div>> Date: Mon, 28 Nov 2011 17:30:52 -0500<br>> Subject: Re: [vtkusers] (no subject)<br>> From: daviddoria@gmail.com<br>> To: djb_ro@hotmail.co.uk<br>> CC: vtkusers@vtk.org<br>> <br>> On Mon, Nov 28, 2011 at 5:18 PM, Dan Barker <djb_ro@hotmail.co.uk> wrote:<br>> > Dear All,<br>> > I have a vtkImageData object which has several scalar components set as<br>> > voxels->SetNumberOfScalarComponents(4);<br>> > and set as<br>> > voxels->SetScalarComponentFromDouble(i,j,k,comp,0.0);<br>> > I wish to run vtkMarchingCubes algorithm on each scalar component<br>> > individually. How do I access this? When I had just one component I could<br>> > simply do<br>> > vtkMarchingCubes *surface = vtkMarchingCubes::New();<br>> > surface->SetInput(voxels);<br>> > // etc ...<br>> > And marching cubes would run correctly and return a very nice looking<br>> > surface. But now I cannot see a way to tell vtkMarchingCubes which component<br>> > to use.<br>> > Any help with this would be most appreciated.<br>> > Regards,<br>> > Dan<br>> <br>> You may be looking for vtkImageExtractComponents:<br>> <br>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ExtractComponents<br>> <br>> David<br></div></div>                                            </div></body>
</html>