⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmphotoedit1.frm

📁 1、以DLL形式提供医生工作站 2、 根据【检查项目】
💻 FRM
📖 第 1 页 / 共 4 页
字号:
            Style           =   1  'Graphical
            TabIndex        =   12
            ToolTipText     =   "R"
            Top             =   1340
            Width           =   735
         End
         Begin VB.CommandButton btnAddScale 
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   12
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   530
            Left            =   120
            Picture         =   "frmPhotoEdit.frx":11EC3
            Style           =   1  'Graphical
            TabIndex        =   11
            ToolTipText     =   "增大"
            Top             =   760
            Width           =   735
         End
         Begin VB.CommandButton btnSubScale 
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   12
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   530
            Left            =   960
            Picture         =   "frmPhotoEdit.frx":12623
            Style           =   1  'Graphical
            TabIndex        =   10
            ToolTipText     =   "减小"
            Top             =   760
            Width           =   735
         End
         Begin VB.CommandButton btnPatientInfo 
            DownPicture     =   "frmPhotoEdit.frx":12CFC
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   12
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   530
            Left            =   960
            Picture         =   "frmPhotoEdit.frx":13C46
            Style           =   1  'Graphical
            TabIndex        =   9
            ToolTipText     =   "病人信息"
            Top             =   4320
            Width           =   735
         End
         Begin VB.CommandButton btnRuler 
            DownPicture     =   "frmPhotoEdit.frx":143C5
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   12
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   530
            Left            =   120
            Picture         =   "frmPhotoEdit.frx":1530F
            Style           =   1  'Graphical
            TabIndex        =   8
            ToolTipText     =   "显示标尺"
            Top             =   4320
            Width           =   735
         End
         Begin VB.CommandButton btnOriginal 
            DownPicture     =   "frmPhotoEdit.frx":1591A
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   12
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   530
            Index           =   0
            Left            =   960
            Picture         =   "frmPhotoEdit.frx":16864
            Style           =   1  'Graphical
            TabIndex        =   7
            ToolTipText     =   "原始图像"
            Top             =   5760
            Width           =   735
         End
         Begin VB.CommandButton btnFilterClean 
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   12
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   530
            Left            =   960
            Picture         =   "frmPhotoEdit.frx":16EC7
            Style           =   1  'Graphical
            TabIndex        =   6
            ToolTipText     =   "滤镜"
            Top             =   3720
            Width           =   735
         End
         Begin MSComDlg.CommonDialog CDialog 
            Left            =   120
            Top             =   8640
            _ExtentX        =   847
            _ExtentY        =   847
            _Version        =   393216
         End
      End
   End
   Begin VB.Label lblPatientInfo 
      BackColor       =   &H00FFFFFF&
      BorderStyle     =   1  'Fixed Single
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   0
      TabIndex        =   2
      Top             =   9120
      Width           =   11505
   End
End
Attribute VB_Name = "frmPhotoEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

'图片大小每次增加或减少的幅度
Const DICOM_ADD_SCALE = 2

'放大镜倍数
Const DICOM_MAG_ZOOM_SIZE = 2
Const PHOTO_MOVE = 4

'初始化DCM打开文件路径
Public strOriginalOpenFileName As String

'初始化窗宽
Dim nOriginalWinWidth As Long

'初始化窗位
Dim nOriginalWinCenter As Long

Dim bArrowDown As Boolean

'是否已锐化
Dim bSharpen As Boolean

'上一次使用的DCM ImageTool
Dim giPrvTool As Integer
Dim gbSetImageTool As Boolean

Dim gbCopyImage As Boolean


'鼠标 坐标--DCM编辑区域
Dim Dcm_Mouse_X1 As Long
Dim Dcm_Mouse_Y1 As Long

Dim Dcm_Mouse_X2 As Long
Dim Dcm_Mouse_Y2 As Long




Private Sub btnAddScale_Click()
    On Error GoTo ErrHandler
    dcmEdit.ImageZoomPct = dcmEdit.ImageZoomPct + DICOM_ADD_SCALE
    
    
    Exit Sub
ErrHandler:
    
End Sub

'按钮事件--调窗
Private Sub btnAdjustWindow_Click()
On Error GoTo ErrHandler
    dcmEdit.ImageTool = 1
    Exit Sub
ErrHandler:
    
End Sub


'按钮事件--角度
Private Sub btnAngle_Click()
    dcmEdit.ImageTool = 9
End Sub

'按钮事件--箭头
Private Sub btnArrow_Click()
    dcmEdit.ImageTool = 10
End Sub

'按钮事件--最佳
Private Sub btnBestFit_Click()
    dcmEdit.ImageZoomBestFit = True
End Sub


Private Sub btnBlur_Click()
On Error GoTo ErrHandler
    
    dcmEdit.ImageProcessBlur = True
    Exit Sub
ErrHandler:
End Sub

'按钮事件--裁剪
Private Sub btnClip_Click()
    On Error GoTo ErrHandler
    'picEdit.Name
    If MsgBox("您确认将原图替换为剪切的区域?", vbYesNo Or vbQuestion, "提示") = vbNo Then
        Exit Sub
    End If
    '先保存Pic上的
    Dim strPicturePath As String
    strPicturePath = App.Path + "\" + FILM_EDIT_PATH
    If Dir(strPicturePath, vbDirectory Or vbSystem Or vbReadOnly Or vbHidden) = "" Then
        MkDir strPicturePath
    End If
    strPicturePath = strPicturePath + "\" + picEdit.Name
    If Dir(strPicturePath, vbArchive Or vbSystem Or vbReadOnly Or vbHidden) <> "" Then
        Kill strPicturePath
    End If
    
    SavePicture picEdit.Image, strPicturePath
    
    If Dir(strPicturePath, vbArchive Or vbSystem Or vbReadOnly Or vbHidden) <> "" Then
        If Not dcmEdit.OpenFile(strPicturePath) Then
            MsgBox "裁减失败, 原因:I/O错误, 请与系统管理员联系!", vbExclamation, "提示"
            Exit Sub
        End If
    Else
        MsgBox "裁减失败, 原因:I/O错误, 请与系统管理员联系!", vbExclamation, "提示"
        Exit Sub
    End If
    
    picEdit.Visible = False
    Exit Sub
ErrHandler:
    MsgBox "裁减失败, 原因:" + Err.Description, vbExclamation, "提示"
End Sub

Private Sub btnColorScheme_Click()
    dcmEdit.ImageColorScheme = 16
End Sub

Private Sub btnColorSchemeFalse_Click()
    dcmEdit.ImageColorScheme = -16
End Sub

Private Sub btnConcentrate_Click()
    Me.dcmEdit.ImageTool = 2
End Sub

'按钮事件--复制
Private Sub btnCopy_Click()
On Error GoTo ErrHandler
    giPrvTool = dcmEdit.ImageTool
    dcmEdit.ImageTool = 14
    gbCopyImage = True
    
    
    Exit Sub
ErrHandler:
End Sub

'按钮事件--Do Nothing
Private Sub btnDefault_Click()
On Error GoTo ErrHandler
    dcmEdit.ImageTool = 14
    
    picFilter.Visible = False
    
    Exit Sub
ErrHandler:
End Sub

Private Sub btnDefaultWH_Click()
On Error GoTo ErrHandler
    If Not Me.frmDefaultDcmWH.Visible Then
        Me.frmDefaultDcmWH.Visible = True
        txtDcmWidth.Text = CStr(dcmEdit.ImageWinWidth)
        txtDcmCenter.Text = CStr(dcmEdit.ImageWinCenter)
    Else
        Me.frmDefaultDcmWH.Visible = False
    End If
Exit Sub
ErrHandler:

End Sub



Private Sub btnEllipse_Click()
    dcmEdit.ImageTool = 7
End Sub

Private Sub btnEmboss_Click()
On Error GoTo ErrHandler
    dcmEdit.ImageProcessEmboss = True
    Exit Sub
    
ErrHandler:
End Sub

'按钮事件--放大镜
Private Sub btnEnlarge_Click()
On Error GoTo ErrHandler
    dcmEdit.ImageMagnifyZoomSize = DICOM_MAG_ZOOM_SIZE
    
    dcmEdit.ImageTool = 3
    Exit Sub
ErrHandler:
    
End Sub

'按钮事件--退出
Private Sub btnExit_Click(Shift As Integer)
On Error GoTo ErrHandler
    Unload Me
    
    Exit Sub
ErrHandler:
    
    
End Sub

Private Sub btnExport_Click()
On Error GoTo ErrHandler
    CDialog.FileName = ""
    CDialog.DefaultExt = "*"
    CDialog.DialogTitle = "Save File"
    CDialog.Filter = "Bitmap File(*.bmp)|*.bmp|JPEG File(*.jpg)|*.jpg|TIFF File(*.tif)|*.tif"
    CDialog.ShowSave
    If CDialog.FileName <> "" Then
        dcmEdit.ImageSaveToFile = CDialog.FileName
    End If
    Exit Sub
ErrHandler:
    
End Sub

Private Sub btnFilter_Click()
On Error GoTo ErrHandler
    dcmEdit.ImageProcessFilter = True
    Exit Sub
ErrHandler:

End Sub

Private Sub btnFilterClean_Click()
    On Error GoTo ErrHandler
    dcmEdit.ImageTool = 14
    picFilter.Visible = True
    
    Exit Sub
ErrHandler:
    
    
End Sub

'按钮事件--左右
Private Sub btnLeftRight_Click()
On Error GoTo ErrHandler
    dcmEdit.ImageProcessFlipHorzontal = True
    Exit Sub
ErrHandler:
End Sub

Private Sub btnLength_Click()
    On Error GoTo ErrHandler
      dcmEdit.ImageTool = 5
      Exit Sub
ErrHandler:
      
End Sub

'按钮事件--移动
Private Sub btnMove_Click()
On Error GoTo ErrHandler
    dcmEdit.ImageTool = PHOTO_MOVE
    Exit Sub
ErrHandler:
End Sub

'按钮事件--90度
Private Sub btnNinety_Click()
    dcmEdit.ImageProcessRotate = 90
End Sub

'按钮事件--1:1
Private Sub btnOne_Click()
On Error GoTo ErrHandler
    dcmEdit.ImageZoomBestFit = False
    Exit Sub
ErrHandler:
    
End Sub



Private Sub btnOriginal_Click(Shift As Integer)
On Error GoTo ErrHandler
    dcmEdit.ImageColorScheme = 1
    
    'dcmEdit.ImageReset
    dcmEdit.ImageZoomBestFit = True
    dcmEdit.OpenFile dcmEdit.OpenFileName
    

    picEdit.Visible = False
    Exit Sub
ErrHandler:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -