Greetings all,<div><br></div><div>In our application we need to load large volumedata (2000x2000x1000 - 8 bpp).</div><div>In the "Vtk Users Guide" I came across following example to create vtkImageData.</div><div>
<br></div><div>vtkImageData *id=vtkImageData::New();</div><div>id->SetDimentions(nx,ny,nz);</div><div>id->SetScalarTypeToUnsignedChar();</div><div>id->SetNumberOfScalarComponents(1);</div><div>id->AllocateScalars();</div>
<div><br></div><div>//Fill in scalar values</div><div>unsigned char *ptr=(unsigned char*)id->GetScalarPointer();</div><div>for(int i=0;i<nx*ny*nx;i++){</div><div> *ptr++=i;</div><div>}</div><div><br></div><div>Looking at the way assigning values and the method GetScalarPointer(); , it seems that one block of memory is allocated for entire (nx*ny*nz) pixels.</div>
<div>If it allocate entire memory block,would it cause problem with memory-fragmentation ?</div><div>Or is there any other memory allocation schema ?</div><div><br></div><div>Thanks in advance.</div><div><br></div><div><br>
</div>