<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'>
Hi David,<div><br></div><div>I think I understand how to set up the vtkPointData so it is associated with the vtkDoubleArrays I need. However I'm slightly confused as to what the equivalent of </div><div><br></div><div>vtkImageData::SetScalarComponentFromDouble(int x,int y,int z,int component,double val)</div><div><br></div><div>would be. I could insert the values into the vtkDoubleArrays linearly but how do I ensure they match the correct vtkImageData index?</div><div><br></div><div>Thanks,</div><div>Dan<br><br><div>> From: dave.demarle@kitware.com<br>> Date: Thu, 1 Dec 2011 08:56:59 -0500<br>> Subject: Re: [vtkusers] Uniform Grid with Vectors and Scalars<br>> To: djb_ro@hotmail.co.uk<br>> CC: vtkusers@vtk.org<br>> <br>> Call myImageData->Get[Point/Cell]Data() to get a hold of the container<br>> (vtkDataSetAttributes) for the point/cell associated arrays. The<br>> container can hold any number of arrays and they can have any number<br>> of components. Each array (vtkAbstractArray) has a SetName(const char<br>> *) and GetName method too.<br>> The API for vtkImageData that exposes only one scalar array is a<br>> legacy from the days before that container existed. It works simply by<br>> finding the one array in the container that has been marked as the<br>> "active" scalars.<br>> <br>> <br>> David E DeMarle<br>> Kitware, Inc.<br>> R&D Engineer<br>> 21 Corporate Drive<br>> Clifton Park, NY 12065-8662<br>> Phone: 518-881-4909<br>> <br>> <br>> <br>> On Thu, Dec 1, 2011 at 6:41 AM, Dan Barker <djb_ro@hotmail.co.uk> wrote:<br>> > Dear all,<br>> ><br>> > I have several fields, some of which are vector quantities and others<br>> > scalar, that I wish to store at points on a regular grid, i.e. cubic<br>> > lattice.<br>> ><br>> > I have some code working using the 'vtkImageData' class. This is okay except<br>> > it can only seem to store scalars (unless I'm missing something) and further<br>> > I can't see a way to label the scalar components of the vtkImageData with<br>> > meaningful names.<br>> ><br>> > So my question is: What class is best used to store mixed scalar/vector<br>> > quantities on a regular grid?<br>> ><br>> > Kind regards,<br>> > Dan<br>> ><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></div></div>                                            </div></body>
</html>