[Insight-users] Rendering an ITK-read Dicom image in MFC
Luis Ibanez
luis.ibanez at kitware.com
Thu Aug 19 21:00:55 EDT 2004
Hi Ulrike,
Why don't you use VTK in order to display the image?
This is quite straight forward if you use the
vtkImageViewer class. MFC is a GUI library, not a
visualization platform.
About getting the dimensions of the image please
read the DataRepresentation chapter of the ITK
SoftwareGuide
http://www.itk.org/ItkSoftwareGuide.pdf
You will find details regarding the notions
of Regions and their size.
Regards,
Luis
-----------------------
Ulrike Rinehart wrote:
> Hi,
>
>
>
> I am trying to render a DICOM image in MFC that was read in via ITK
> functions. The DicomImageViewer application sample was used to orient
> myself. I am new to FLTK and don’t know exactly what they are doing to
> render the image. What I had in mind for MFC was something like the code
> below, given that m_pData is the buffer for the pixel data.
>
>
>
> static BITMAP bitmap = {0, xPix, yPix, 512, 1, 1};
>
>
>
> bitmap.bmBits = (LPVOID)pDoc->m_pData;
>
> HBITMAP hBitmap = ::CreateBitmapIndirect(&bitmap);
>
> ASSERT(hBitmap);
>
>
>
> DrawBitmap(pDC->GetSafeHdc(), hBitmap, 0, 0);
>
>
>
> Also, if this is even the right approach, I am not sure how to determine
> the number of pixels/row (xPix) and the number of pixels/col (yPix).
> Would appreciate any input on this.
>
>
>
> Ulrike
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list