<html><head><style type="text/css"><!-- DIV {margin:0px} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div>hello all,<br>I 'm using VTK for 3D reconstitution , MPR and MIP (maximum intesity projection).<br>for the constitution of the volume of all the pixmaps of the images I use a vtkStructuredPoints object :<br>data2=vtkStructuredPoints::New();<br>data2-&gt;SetDimensions(WdthVlm,HghtVlm,DpthVlm);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>data2-&gt;SetSpacing (wdgMPR-&gt;xsp, wdgMPR-&gt;ysp, wdgMPR-&gt;zsp);<br>data2-&gt;SetScalarType(VTK_UNSIGNED_SHORT);<br>data2-&gt;AllocateScalars();<br><br>after thar I recover the scalarpointer to fill the volume by the data that i own :<br><br>unsigned short * ptr2=(unsigned short *) data2-&gt;GetScalarPointer();<br><br>&nbsp; for (cptdcm=0;cptdcm&lt;DpthVlm;cptdcm++)<br>&nbsp; {<br>&nbsp;&nbsp;&nbsp;
 for(int i=0;i&lt;HghtVlm;i++)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for(int j=0; j&lt;WdthVlm;j++)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; { <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;*(ptr2++)&nbsp; =&nbsp; *(myDataImages++); //myDataImages is a unsigned short pointer of course<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp; }<br><br>then I use the vtkStructuredPoints object like an input for the vtkImageMapToColors that I use (3 : 1 for each plane X, Y and Z).<br><br>every thing goes allright but sometimes something wrong happens and I don't know why :<br>the allocation of the memory is not accomplished when I do : data2-&gt;AllocateScalars(); and the value of&nbsp; unsigned short * ptr2=(unsigned short *) data2-&gt;GetScalarPointer() is 0x00000 and I when I chek the system use of the memory : theer is not a memory allocated !!!!!!!<br><br>could you please help me to know when this function doesn't do
 allocate memory and is there sthing to do before allocating to prevent from such problems!<br>it's really an emergency!<br>thank you for your help !<br>
</div></div></body></html>