[vtkusers] (no subject)

Dan Barker djb_ro at hotmail.co.uk
Tue Nov 29 09:08:40 EST 2011


Thanks David,
This looks suitable.
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?
Cheers,Dan
> Date: Mon, 28 Nov 2011 17:30:52 -0500
> Subject: Re: [vtkusers] (no subject)
> From: daviddoria at gmail.com
> To: djb_ro at hotmail.co.uk
> CC: vtkusers at vtk.org
> 
> On Mon, Nov 28, 2011 at 5:18 PM, Dan Barker <djb_ro at hotmail.co.uk> wrote:
> > Dear All,
> > I have a vtkImageData object which has several scalar components set as
> >    voxels->SetNumberOfScalarComponents(4);
> > and set as
> >    voxels->SetScalarComponentFromDouble(i,j,k,comp,0.0);
> > I wish to run vtkMarchingCubes algorithm on each scalar component
> > individually. How do I access this? When I had just one component I could
> > simply do
> >     vtkMarchingCubes *surface = vtkMarchingCubes::New();
> >     surface->SetInput(voxels);
> >     // etc ...
> > And marching cubes would run correctly and return a very nice looking
> > surface. But now I cannot see a way to tell vtkMarchingCubes which component
> > to use.
> > Any help with this would be most appreciated.
> > Regards,
> > Dan
> 
> You may be looking for vtkImageExtractComponents:
> 
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ExtractComponents
> 
> David
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111129/c3f2a2bd/attachment.htm>


More information about the vtkusers mailing list