📄 udisplay.h
字号:
//---------------------------------------------------------------------------
// This file is part of Dicom Explorer, see http://www.sourceforge.net/projects/dcmsee
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This software is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// Liu Jie (liucoldstar@yahoo.com)
//
//---------------------------------------------------------------------------
#ifndef uDisplayH
#define uDisplayH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <Menus.hpp>
#include <jpeg.hpp>
#include <ComCtrls.hpp>
#include <Printers.hpp>
#include <stdio.h>
#include "jpegless.h"
#include "uCommon.h"
#include "GR32_Image.hpp"
#include "FreeImage.h"
//---------------------------------------------------------------------------
class TfrmDisplay : public TForm
{
__published: // IDE-managed Components
TImgView32 *ImgView32;
void __fastcall ImgView32MouseMove(TObject *Sender,
TShiftState Shift, int X, int Y, TCustomLayer *Layer);
void __fastcall ImgView32MouseDown(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y,
TCustomLayer *Layer);
void __fastcall ImgView32MouseUp(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y,
TCustomLayer *Layer);
private:
int m_nRGBSegmentOffset[3];
char *m_pBuffer;
TImageInformation *m_pImageInformation;
TBitmap32 *m_pBitmap32;
int m_nX;
int m_nY;
int m_nWindowCenter;
int m_nWindowWidth;
int m_nMinValue,m_nMaxValue;
bool m_bIsMouseDrag;
TPoint m_OldMousePos;
AnsiString m_TempFileName;
private: // User declarations
void __fastcall ReadRawColor(void);
void __fastcall ReadRawGray8(void);
void __fastcall ReadRawGray16(void);
void __fastcall ReadRLEGray8(void);
void __fastcall ReadRLEGray16(void);
void __fastcall ReadRLEColor(void);
void __fastcall ReadJPEG(void);
void __fastcall ReadJPEGLSColor(void);
void __fastcall ReadJPEGLSGray8(void);
void __fastcall ReadJPEGLSGray16(void);
void __fastcall AllocateMemory(void);
int __fastcall RescaleFromBuffer(int nItem);
int __fastcall RescaleToBuffer(int nItem);
TRect GetCenteredRectToFit(TRect SrcRect,TRect DstRect);
public: // User declarations
__fastcall TfrmDisplay(TComponent* Owner);
__fastcall ~TfrmDisplay();
void __fastcall SetImageInformation(TImageInformation *m_pImageInformation);
void __fastcall ScaleToByte(int nWindowCenter,int nWindowWdith);
void __fastcall DrawImage(void);
void __fastcall FitToWidth(void);
void __fastcall FitToHeight(void);
void __fastcall ZoomIn(void);
void __fastcall ZoomOut(void);
void __fastcall BestFit(void);
void __fastcall ActualSize(void);
void __fastcall Rotate90(void);
void __fastcall Rotate180(void);
void __fastcall Rotate270(void);
void __fastcall FlipHorz(void);
void __fastcall FlipVert(void);
void __fastcall Print(AnsiString FileName);
void __fastcall SaveToFile(AnsiString FileName);
//void __fastcall SetStatusBarText(void);
void __fastcall Clear(void);
void __fastcall GetCenterWidth(int &nCenter,int &nWidth);
void __fastcall GetValueRange(int &nMax,int &nMin);
void __fastcall AutoContrast(void);
void __fastcall SaveAsGray(AnsiString FileName,FREE_IMAGE_FORMAT nFileType);
void __fastcall SaveAsColor(AnsiString FileName,FREE_IMAGE_FORMAT nFileType);
};
//---------------------------------------------------------------------------
extern PACKAGE TfrmDisplay *frmDisplay;
//---------------------------------------------------------------------------
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -