ShowWindowLevelDlg Example for C++ 5.0 and later
m_pRasterColorDlg->LowBit = m_LeadRasterView.GetRaster ().GetMinBit ();
m_pRasterColorDlg->HighBit = m_LeadRasterView.GetRaster().GetMaxBit ();
m_pRasterColorDlg->WindowLevelLow = m_LeadRasterView.GetRaster().GetMinVal ();
m_pRasterColorDlg->WindowLevelHigh = m_LeadRasterView.GetRaster().GetMaxVal();
m_pRasterColorDlg->WindowLevelFactor = 0;
switch (m_LeadRasterView.GetRaster().GetIsGrayscale ())
{
case GRAY_ORDEREDNORMAL:
m_pRasterColorDlg->StartColor = RGB(0, 0, 0);
m_pRasterColorDlg->EndColor = RGB(255, 255, 255);
case GRAY_ORDEREDINVERSE:
m_pRasterColorDlg->StartColor = RGB(255, 255, 255);
m_pRasterColorDlg->EndColor = RGB(0, 0, 0);
case GRAY_NOTORDERED:
m_pRasterColorDlg->StartColor = RGB(0, 0, 0);
m_pRasterColorDlg->EndColor = RGB(255, 255, 255);
}
m_pRasterColorDlg->Bitmap = m_LeadRasterView.GetRaster().GetBitmap ();
m_pRasterColorDlg->WindowLevelFlags = FILL_LUT_OUTSIDE | FILL_LUT_LINEAR;
m_pRasterColorDlg->PutUIFlags(WINDOWLEVEL_SHOW_PREVIEW |
WINDOWLEVEL_SHOW_TOOL_ZOOMLEVEL |
WINDOWLEVEL_SHOW_RANGE |
WINDOWLEVEL_AUTOPROCESS);
m_pRasterColorDlg->ShowWindowLevelDlg ((long)this->m_hWnd);