[Insight-users] re:Help on getting and reading image buffer

Yixun Liu yxliu at fudan.edu.cn
Tue Aug 29 21:23:54 EDT 2006


Hi,

You should change 

> int iscale = gluScaleImage(GL_RGBA, (GLint)lwidth, (GLint)lheight, 
> GL_UNSIGNED_BYTE, &region, (GLint)nNewWidth, (GLint)nNewHeight, 
> GL_UNSIGNED_BYTE, rasterNew ) ;

to

unsighed char* data = (ussigned char*)image->GetBufferPointer();
> int iscale = gluScaleImage(GL_RGBA, (GLint)lwidth, (GLint)lheight, 
> GL_UNSIGNED_BYTE, data, (GLint)nNewWidth, (GLint)nNewHeight, 
> GL_UNSIGNED_BYTE, rasterNew ) ;

Cheers,

Yixun Liu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20060830/ff901ab0/attachment.html


More information about the Insight-users mailing list