<P>Hi,</P>
<P>I have problems accessing the vtkDataArray class instance in my program. <BR>I have a structured Grid data file that I read with the help of the vtkStructuredGridReader class. The points in the file are of type double. <BR>I want to copy some of the points from the vtkDoubleArray, ( I presume that the (x,y,z) point coordinates are stored after structuredGridReader reads the file), into my own double array. <BR><BR>It looks like it is possible to get points of type float or int using the&nbsp;code below but there is no method that returns points of type double.<BR><BR>****<BR>        vtkStructuredGridReader *reader = vtkStructuredGridReader::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp; reader-&gt;SetFileName("../../../vtk32/java/frame51.vtk");<BR>&nbsp;&nbsp;&nbsp;&nbsp; reader-&gt;SetScalarsName("sc2");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reader-&gt;Update();<BR>        vtkStructuredGrid *structGrid = vtkStructuredGrid::New();<BR>         structGrid = reader-&gt;GetOutput();</P>
<P>&nbsp;structGrid-&gt;GetPoint (vtkIdType ptId, float p[3]);&nbsp;&nbsp; // some variable ptId .<BR><BR></P>
<P>&nbsp;I want to get type double points that I initially had on the file. Is there a way to do this ? ( I want to use the&nbsp;StructuredGridReader object so that I can get the structuredGrid that I intend to use for finding cell connectivity later ). <BR><BR>I tested using the ReadArray(const char* dataType, int numTuples, int numComponents) in the vtkDataReader class but the method seems to dump core.<BR><BR>The code is given below. If anyone knows a way to get the point coordinates as type double, please let me know.<BR></P>
<P>Thanks in advance for any help.<BR><BR>Regards,<BR>Joseph.<BR><BR>*************************************************<BR><BR>        vtkStructuredGridReader *reader = vtkStructuredGridReader::New();<BR>        <BR>&nbsp;&nbsp;&nbsp;&nbsp; reader-&gt;SetFileName("../../../vtk32/java/frame51.vtk");<BR>&nbsp;&nbsp;&nbsp;&nbsp; reader-&gt;SetScalarsName("sc2");<BR>&nbsp;&nbsp;&nbsp;&nbsp; reader-&gt;Update();<BR>        vtkStructuredGrid *structGrid = vtkStructuredGrid::New();<BR>&nbsp;&nbsp;&nbsp; structGrid = reader-&gt;GetOutput();<BR>                 <BR>        int dimensions[3];<BR>        &nbsp;&nbsp;&nbsp; structGrid-&gt;GetDimensions(dimensions);<BR>        &nbsp;&nbsp;&nbsp; static int totalPoints = 1;<BR>        &nbsp;&nbsp; for(int i=0; i&lt;3; i++)<BR>&nbsp;        totalPoints = totalPoints * dimensions[i];<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;cout &lt;&lt; "total Points is " &lt;&lt; totalPoints &lt;&lt;endl;<BR><BR>        vtkDataArray *dataArray;<BR><BR>        dataArray = vtkDoubleArray::New();<BR>                 <BR>        dataArray = reader-&gt;ReadArray("double", totalPoints, 3);<BR></P><p><br><hr size=1><b>Do You Yahoo!?</b><br>
<a href="http://rd.yahoo.com/welcome/*http://fifaworldcup.yahoo.com/fc/en/spl">Sign-up for Video Highlights</a> of 2002 FIFA World Cup