Thanks <span class="Apple-style-span" style="font-family: verdana, sans-serif; ">Dženan,</span><div><font class="Apple-style-span" face="verdana, sans-serif"><br></font></div><div><font class="Apple-style-span" face="verdana, sans-serif">I am using MinGW and QT Opensource , so I am restricted to 32Bit.</font></div>
<div><font class="Apple-style-span" face="verdana, sans-serif">Before using vtkImageData , I used simple data-structure that allocates one memory block for each Z-Slice,(not a continuous block for the entire volume ).That helped me to avoid the memory fragmentation.</font></div>
<div><font class="Apple-style-span" face="verdana, sans-serif">Now I moved to vtkImagaData.Does it always allocate one large continuous block or is there any flag to change memory allocation scheme?</font></div><div><font class="Apple-style-span" face="verdana, sans-serif"><br>
</font></div><div><font class="Apple-style-span" face="verdana, sans-serif">Thanks <br></font><br><div class="gmail_quote">2011/4/8 Dženan Zukić <span dir="ltr"><<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><font size="2"><font face="verdana,sans-serif">If you are close to the limit of the address space (like using 1GB block on 32bit machine), it is a problem. However on 64bit system 4GB block is not an issue.</font></font><div>
<font size="2"><font face="verdana,sans-serif"><br></font></font></div><div><font size="2"><font face="verdana,sans-serif">Regards,</font></font></div><div><font size="2"><font face="verdana,sans-serif">Dženan<br></font></font><br>
<div class="gmail_quote"><div><div></div><div class="h5">On Fri, Apr 8, 2011 at 07:42, Ashika Umanga Umagiliya <span dir="ltr"><<a href="mailto:aumanga@biggjapan.com" target="_blank">aumanga@biggjapan.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">
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>
<br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>