<html><div style='background-color:'><DIV class=RTE>Hello</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>I have a 2D dynamic array which is declared as</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>float **f = new(float *([numRows]));</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>and later on I do the proper intializations..etc..</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>I experimented with this 2d array in a program without using any of the vtk functions, and it works fine...</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>However, I need to load this 2d array to be used as vtkImageData, so I did the following:</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>floatarray->SetVoidArray( f, TotalCols*TotalRows, 1);</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>(and floatarray is then used for my imagedata..)</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>But I know that when you pass dynamic 2D arrays normally, it only works if it is written like this:</DIV>
<DIV class=RTE>void function (float ** &f) </DIV>
<DIV class=RTE>{</DIV>
<DIV class=RTE>//</DIV>
<DIV class=RTE>}</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>So anyways, I passed my 'f' array into SetVoidArray and somewhere along the way I get a 'memory could not be read' error..</DIV>
<DIV class=RTE>I know it must be to do with the way I have passed my dynamic 2d array into vtk's function</DIV>
<DIV class=RTE><BR>Can someone help me do this the proper way??</DIV>
<DIV class=RTE>Thanks</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>Armand</DIV></div><br clear=all><hr> <a href="http://g.msn.com/8HMBENUS/2743??PS=">Enjoy the holiday season with great tips from MSN. </a> </html>