[Insight-users] Rendering an ITK-read Dicom image in MFC

Ulrike Rinehart ulriker at pathwaymri.com
Thu Aug 19 20:27:58 EDT 2004


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

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20040819/b482b663/attachment.htm


More information about the Insight-users mailing list