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

📄 frmimageedit.frm

📁 VB6.0编写的医院影像系统
💻 FRM
📖 第 1 页 / 共 4 页
字号:
            Left            =   180
            TabIndex        =   28
            Top             =   945
            Width           =   900
         End
         Begin VB.OptionButton optFlip 
            Caption         =   "垂直"
            Height          =   180
            Index           =   1
            Left            =   180
            TabIndex        =   29
            Top             =   630
            Width           =   900
         End
         Begin VB.OptionButton optFlip 
            Caption         =   "水平"
            Height          =   315
            Index           =   0
            Left            =   180
            TabIndex        =   30
            Top             =   210
            Value           =   -1  'True
            Width           =   900
         End
      End
      Begin VB.Frame fraColorTone 
         Caption         =   "色调"
         Height          =   1215
         Left            =   120
         TabIndex        =   22
         Top             =   1320
         Width           =   3090
         Begin VB.CommandButton cmdEdit 
            Caption         =   "暗化"
            Height          =   360
            Index           =   9
            Left            =   1140
            TabIndex        =   26
            Tag             =   "边缘"
            Top             =   300
            Width           =   900
         End
         Begin VB.CommandButton cmdEdit 
            Caption         =   "增亮"
            Height          =   360
            Index           =   8
            Left            =   180
            TabIndex        =   25
            Tag             =   "边缘"
            Top             =   300
            Width           =   900
         End
         Begin VB.CommandButton cmdEdit 
            Caption         =   "反色"
            Height          =   360
            Index           =   1
            Left            =   180
            TabIndex        =   24
            Tag             =   "反色"
            Top             =   720
            Width           =   900
         End
         Begin VB.CommandButton cmdEdit 
            Caption         =   "黑白"
            Height          =   360
            Index           =   0
            Left            =   2100
            TabIndex        =   23
            Tag             =   "黑白"
            Top             =   300
            Width           =   900
         End
      End
      Begin VB.Frame fraQuality 
         Caption         =   "画质"
         Height          =   1215
         Left            =   120
         TabIndex        =   15
         Top             =   0
         Width           =   3105
         Begin VB.CommandButton cmdEdit 
            Caption         =   "发散"
            Height          =   360
            Index           =   7
            Left            =   2100
            TabIndex        =   21
            Tag             =   "发散"
            Top             =   705
            Width           =   900
         End
         Begin VB.CommandButton cmdEdit 
            Caption         =   "边缘"
            Height          =   360
            Index           =   6
            Left            =   2100
            TabIndex        =   20
            Tag             =   "边缘"
            Top             =   285
            Width           =   900
         End
         Begin VB.CommandButton cmdEdit 
            Caption         =   "锐化"
            Height          =   360
            Index           =   3
            Left            =   1140
            TabIndex        =   19
            Tag             =   "锐化"
            Top             =   705
            Width           =   900
         End
         Begin VB.CommandButton cmdEdit 
            Caption         =   "柔化"
            Height          =   360
            Index           =   2
            Left            =   180
            TabIndex        =   18
            Tag             =   "柔化"
            Top             =   705
            Width           =   900
         End
         Begin VB.CommandButton cmdEdit 
            Caption         =   "浮雕"
            Height          =   360
            Index           =   4
            Left            =   1140
            TabIndex        =   17
            Tag             =   "浮雕"
            Top             =   285
            Width           =   900
         End
         Begin VB.CommandButton cmdEdit 
            Caption         =   "雕刻"
            Height          =   360
            Index           =   5
            Left            =   180
            TabIndex        =   16
            Tag             =   "雕刻"
            Top             =   285
            Width           =   900
         End
      End
      Begin VB.CommandButton cmdReload 
         Caption         =   "重载"
         Height          =   360
         Left            =   2250
         TabIndex        =   14
         Top             =   9660
         Width           =   960
      End
      Begin VB.CommandButton cmdUndo 
         Caption         =   "恢复"
         Height          =   360
         Left            =   1185
         TabIndex        =   7
         Top             =   9660
         Width           =   960
      End
      Begin VB.CommandButton cmdOK 
         Caption         =   "确定"
         Height          =   360
         Left            =   1185
         TabIndex        =   5
         Top             =   10080
         Width           =   960
      End
      Begin VB.CommandButton cmdSaveAs 
         Caption         =   "另存"
         Height          =   360
         Left            =   2250
         TabIndex        =   4
         Top             =   9240
         Width           =   960
      End
      Begin VB.CommandButton cmdSave 
         Caption         =   "保存"
         Height          =   360
         Left            =   1185
         TabIndex        =   3
         Top             =   9240
         Width           =   960
      End
      Begin VB.CommandButton cmdOpen 
         Caption         =   "文件"
         Height          =   360
         Left            =   120
         TabIndex        =   2
         Top             =   9240
         Width           =   960
      End
   End
   Begin VB.PictureBox FXImgDrag 
      AutoSize        =   -1  'True
      BackColor       =   &H8000000A&
      Height          =   645
      Left            =   840
      ScaleHeight     =   585
      ScaleWidth      =   855
      TabIndex        =   74
      Top             =   6060
      Visible         =   0   'False
      Width           =   915
   End
   Begin VB.PictureBox picConner 
      BorderStyle     =   0  'None
      Height          =   285
      Left            =   4980
      ScaleHeight     =   285
      ScaleMode       =   0  'User
      ScaleWidth      =   318.529
      TabIndex        =   13
      Top             =   6900
      Width           =   285
   End
   Begin MSComCtl2.FlatScrollBar fscH 
      Height          =   285
      Left            =   360
      TabIndex        =   11
      Top             =   6900
      Width           =   1665
      _ExtentX        =   2937
      _ExtentY        =   503
      _Version        =   393216
      Appearance      =   0
      Arrows          =   65536
      Orientation     =   1179649
   End
   Begin MSComCtl2.FlatScrollBar fscV 
      Height          =   1665
      Left            =   4920
      TabIndex        =   12
      Top             =   3420
      Width           =   285
      _ExtentX        =   503
      _ExtentY        =   2937
      _Version        =   393216
      Appearance      =   0
      LargeChange     =   30
      Max             =   100
      Orientation     =   1179648
   End
   Begin VB.Frame fraSplit 
      Height          =   6705
      Left            =   6270
      TabIndex        =   10
      Top             =   165
      Width           =   30
   End
   Begin MSComctlLib.StatusBar sbrEdit 
      Align           =   2  'Align Bottom
      Height          =   300
      Left            =   0
      TabIndex        =   8
      Top             =   10785
      Width           =   10095
      _ExtentX        =   17806
      _ExtentY        =   529
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   2
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   1
            Object.Width           =   13758
            Key             =   "Progress"
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   3969
            MinWidth        =   3969
            Text            =   "图象: 未加载"
            TextSave        =   "图象: 未加载"
            Key             =   "Info"
         EndProperty
      EndProperty
   End
   Begin MSComDlg.CommonDialog cdlSave 
      Left            =   0
      Top             =   1500
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
      DialogTitle     =   "图形另存为:"
      Filter          =   "图形文件(*.BMP)|*.BMP"
   End
   Begin MSComDlg.CommonDialog cdlOpen 
      Left            =   0
      Top             =   900
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
      DialogTitle     =   "请选择要打开的图片:"
      Filter          =   "图形文件(*.BMP,*.GIF)|*.BMP;*.GIF"
   End
   Begin VB.PictureBox picImage 
      AutoRedraw      =   -1  'True
      AutoSize        =   -1  'True
      BackColor       =   &H8000000A&
      BorderStyle     =   0  'None
      Height          =   3060
      Left            =   480
      ScaleHeight     =   204
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   273
      TabIndex        =   0
      Top             =   180
      Width           =   4095
   End
   Begin VB.PictureBox picBak 
      AutoRedraw      =   -1  'True
      AutoSize        =   -1  'True
      BackColor       =   &H8000000A&
      BorderStyle     =   0  'None
      Height          =   900
      Left            =   4185
      ScaleHeight     =   60
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   75
      TabIndex        =   6
      Top             =   675
      Visible         =   0   'False
      Width           =   1125
   End
   Begin MSComctlLib.ProgressBar pbr 
      Height          =   165
      Left            =   120
      TabIndex        =   9
      Top             =   3315
      Visible         =   0   'False
      Width           =   3870
      _ExtentX        =   6826
      _ExtentY        =   291
      _Version        =   393216
      Appearance      =   0
   End
   Begin VB.PictureBox picMirror 
      AutoRedraw      =   -1  'True
      AutoSize        =   -1  'True
      BackColor       =   &H8000000A&
      BorderStyle     =   0  'None
      Height          =   2100
      Left            =   780
      ScaleHeight     =   140
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   161
      TabIndex        =   45
      Top             =   3720
      Visible         =   0   'False
      Width           =   2415
   End
End
Attribute VB_Name = "frmImageEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private IP() As Integer
Private x As Long
Private y As Long
Public FileName As String           '图像文件名



Private MouseDown As Boolean

Public ViewRate As Single

Public TagString As String          '附加的字串,用于打印单幅图片

Dim ShowWidth As Long               '显示区域的宽
Dim ShowHeight As Long              '显示区域的高

'缩放的比例
Dim ScaleRate As Single

Private OriginHeight As Long
Private OriginWidth As Long

Private Sub cmdCancel_Click()
    Unload Me
End Sub

Private Sub cmdEdit_Click(Index As Integer)
    Dim i As Integer
    Dim j As Integer
    Dim P As Integer
    Dim Dx As Integer
    Dim Dy As Integer
    Dim Delta As Single
    Dim A As Single             '可调参数
    Dim r As Integer            '红色变量
    Dim G As Integer            '绿色变量
    Dim B As Integer            '蓝色变量
    
    '定制的Filter属性
    Dim F(2, 2)
    Dim Divide
    Dim Blas
    
    '保存备份
    picBak.Picture = picMirror.Picture
    
    '读取颜色数组
    ReadImage
    
    'ShowProgress True
    'pbr.Max = y * 2
    
    Screen.MousePointer = vbHourglass
    Select Case cmdEdit(Index).Caption
        Case "黑白"
            For i = 0 To y - 1
                For j = 0 To x - 1
                    P = (IP(0, j, i) + IP(1, j, i) + IP(2, j, i)) / 3
                    picMirror.PSet (j, i), RGB(P, P, P)
                Next j
                pbr.Value = i + y
            Next i
            
        Case "反色"
            For i = 0 To y - 1
                For j = 0 To x - 1
                    r = 255 - IP(0, j, i)
                    G = 255 - IP(1, j, i)
                    B = 255 - IP(2, j, i)
                    picMirror.PSet (j, i), RGB(r, G, B)
                Next j
                pbr.Value = i + y
            Next i

⌨️ 快捷键说明

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