[Insight-users] Re: Creating bitmap from pixel data
Luis Ibanez
luis.ibanez@kitware.com
Mon, 14 Apr 2003 11:00:10 -0400
Hi Amit,
In order to get a BitMap from a volume data set
you can use one of the following three options:
1) itkExtractImageFilter
2) itkRegionOfInterestImageFilter
3) ImageSliceIterator
--
(1) Can create a 2D image from a 3D volume.
you can then get the pointer to the contiguous
memory buffer with the method
GetBufferPointer();
in the output image of filter
extractFilter->GetOutput()->GetBufferPointer();
(2) Can create a 3D image 1 slice thick from
the 3D volume. Then, again you use the GetBufferPointer
of the output image for initializing your Bitmap.
(3) You can access directly the Volume and use
the ImageSlice iterator, over a region. The region
will be defined with thickness 1 along the dimension
in which you want the slice to be extracted.
Josh Cates recently added a chapter to the SoftwareGuide
describing the use of Iteratos.
http://www.itk.org/ItkSoftwareGuide.pdf
chapter 10, pdf-page 301
Regards,
Luis
------------------------------
amit sinha wrote:
> Dear luis,
> We are doing a project in medical image registration and segmentation
> and calculation of volumetric changes in brain tumor.We are facing a
> problem.We are using ITK to read the dicom images and getting the pixel
> data in a buffer.Now we want to create bitmap from this data using MFC
> classes to show the image.
> We used CBitmap Class and CreateBitmap function to do this but we are
> not getting the image.When we do it with pixelwise using setpixel we
> get the image.
> Suggest a solution to create bitmap.
> We are not using document view architecture but working on dialog
> based project
> Amit kumar
> CS & E
> MCE,Hassan(Karnataka)
> India
>
>
> ------------------------------------------------------------------------
> Do you Yahoo!?
> Yahoo! Tax Center
> <http://us.rd.yahoo.com/finance/mailsig/*http://tax.yahoo.com> - File
> online, calculators, forms, and more