// ImageDlg.cpp : implementation file // #include "stdafx.h" #include "dicomapp.h" #include "ImageDlg.h" ///////////////////////////////////////////////////////////////////////////// // CDicomImageDlg dialog CDicomImageDlg::CDicomImageDlg(CWnd* pParent /*=NULL*/) : CDialog(CDicomImageDlg::IDD, pParent) { //{{AFX_DATA_INIT(CDicomImageDlg) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); } void CDicomImageDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CDicomImageDlg) // NOTE: the ClassWizard will add DDX and DDV calls here //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CDicomImageDlg, CDialog) //{{AFX_MSG_MAP(CDicomImageDlg) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CDicomImageDlg message handlers BOOL CDicomImageDlg::OnInitDialog() { CDialog::OnInitDialog(); SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); // Set small icon CString strText; switch (m_pInfo->nCompression) { case IMAGE_COMPRESSION_NONE: strText = "None"; break; case IMAGE_COMPRESSION_RLE: strText = "Run Length"; break; case IMAGE_COMPRESSION_JPEG_LOSSLESS: strText = "JPEG Lossless"; break; case IMAGE_COMPRESSION_JPEG_LOSSY: strText = "JPEG Lossy"; break; case IMAGE_COMPRESSION_J2K_LOSSLESS: strText = "JPEG 2000 (Lossless Only)"; break; case IMAGE_COMPRESSION_J2K_LOSSY: strText = "JPEG 2000"; break; default: strText = "Unknown"; break; } SetDlgItemText(IDC_COMPRESSION, strText); strText = m_pInfo->szPhotometric; SetDlgItemText(IDC_PHOTOMETRIC, strText); strText.Format("%ld", m_pInfo->nSamplesPerPixel); SetDlgItemText(IDC_SAMPLES_PER_PIXEL, strText); strText.Format("%ld", m_pInfo->nRows); SetDlgItemText(IDC_ROWS, strText); strText.Format("%ld", m_pInfo->nColumns); SetDlgItemText(IDC_COLUMNS, strText); strText.Format("%ld", m_pInfo->nBitsAllocated); SetDlgItemText(IDC_BITS_ALLOCATED, strText); strText.Format("%ld", m_pInfo->nBitsStored); SetDlgItemText(IDC_BITS_STORED, strText); strText.Format("%ld", m_pInfo->nHighBit); SetDlgItemText(IDC_HIGH_BIT, strText); strText.Format("%ld", m_pInfo->nPixelRepresentation); SetDlgItemText(IDC_PIXEL_REPRESENTATION, strText); strText.Format("%ld", m_pInfo->nPlanarConfiguration); SetDlgItemText(IDC_PLANAR_CONFIGURATION, strText); strText.Format("%ld", m_pInfo->nResolutionX); SetDlgItemText(IDC_RESOLUTION_X, strText); strText.Format("%ld", m_pInfo->nResolutionY); SetDlgItemText(IDC_RESOLUTION_Y, strText); strText.Format("%ld", m_pInfo->nSmallestImagePixelValue); SetDlgItemText(IDC_SMALLEST_IMAGE_PIXEL_VALUE, strText); strText.Format("%ld", m_pInfo->nLargestImagePixelValue); SetDlgItemText(IDC_LARGEST_IMAGE_PIXEL_VALUE, strText); strText.Format("%ld, %ld, %ld", m_pInfo->nRedEntries, m_pInfo->nGreenEntries, m_pInfo->nBlueEntries); SetDlgItemText(IDC_PALETTE_ENTRIES, strText); strText.Format("%ld, %ld, %ld", m_pInfo->nRedFirst, m_pInfo->nGreenFirst, m_pInfo->nBlueFirst); SetDlgItemText(IDC_PALETTE_FIRST, strText); strText.Format("%ld, %ld, %ld", m_pInfo->nRedBits, m_pInfo->nGreenBits, m_pInfo->nBlueBits); SetDlgItemText(IDC_PALETTE_BITS, strText); strText.Format("%ld", m_pInfo->nBitsPerPixel); SetDlgItemText(IDC_BITS_PER_PIXEL, strText); strText = (m_pInfo->bGray == FALSE) ? "Color" : "Grayscale"; SetDlgItemText(IDC_GRAY, strText); strText.Format("%ld", m_pInfo->nFrames); SetDlgItemText(IDC_FRAMES, strText); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }