<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><style type="text/css"><!-- DIV {margin:0px;}--></style><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->SetDimensions(WdthVlm,HghtVlm,DpthVlm); <br>data2->SetSpacing (wdgMPR->xsp, wdgMPR->ysp, wdgMPR->zsp);<br>data2->SetScalarType(VTK_UNSIGNED_SHORT);<br>data2->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->GetScalarPointer();<br><br> for (cptdcm=0;cptdcm<DpthVlm;cptdcm++)<br> {<br>
for(int i=0;i<HghtVlm;i++)<br> {<br> for(int j=0; j<WdthVlm;j++)<br> { <br> *(ptr2++) = *(myDataImages++); //myDataImages is a unsigned short pointer of course<br> }<br> }<br> }<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->AllocateScalars(); and the value of unsigned short *
ptr2=(unsigned short *) data2->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><div>_______________________________________________<br>This is the private VTK discussion list. <br>Please keep messages on-topic. Check the FAQ at: <a target="_blank" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a target="_blank" href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></div></div></div></body></html>