生物导航网博客欢迎您......


<<  < 2007 - 11 >  >>
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30


公告
生物导航网博客欢迎您......

我的分类(专题)
生物导航网博客欢迎您......

日志更新

生物导航网博客欢迎您......

最新评论
生物导航网博客欢迎您......

留言板
生物导航网博客欢迎您......

链接

Blog信息
生物导航网博客欢迎您......







Image pro plus 分析TIME LAPSE的MACRO代码 
thinker 发表于 2005-11-10 20:05:15
Sub AOI_time_density
'<c>2
  ret = IpTemplateMode(1)  'Switch template mode on
  ret = IpAoiShow(FRAME_RECTANGLE) 'Show Rectangular AOI tool
  ret = IpAoiMove(0, 0)   'Dummy operator to activate template mode for AOI selection
  ret = IpTemplateMode(0)  'Switch template mode off
  Dim numfr As Long
  ret=IpSeqGet(SEQ_NUMFRAMES,numfr)'Get number of frames in sequence
  If numfr = 1 Then 
    ret = IpMacroStop("Not a sequence image", 0) 
    Exit Sub
  End If
  ret = IpSeqPlay(SEQ_FFRA)     'Go to the first frame
  Dim i As Integer     'Definition of as loop variable
  Dim hstID As Integer   'Define a variable for Histogram ID
  hstID = IpHstCreate()   'Create a Histogram window
  ret = IpHstSetAttr(STATISTICS, 1) 'Set attribute to show statistics in Histogram window
  ret = IpHstSetAttr(ICAL, 1) 'Set attribute to use intensity calibration for the histogram
  ReDim stats(10) As Single
  Dim Mean As Single   'Define array for Histogram statistics
  ReDim profdat(numfr+1) As Single 'Allocate array for the data
        
  For i=0 To numfr-1
    ret = IpHstGet(GETSTATS, 0, stats(0)) 'Get Statistical data out of Histogram
    Mean = stats(0)    'Stats(0) is mean value of Histogram
    ProfDat(i)=Mean    'Save Mean to the data array
    ret = IpSeqPlay(SEQ_NEXT) 'Go to the next frame
  Next i   
  ret=IpHstDestroy()   'Destroy the Histogram
  Dim plot As Integer   'Define variable for plot ID
  plot = IpPlotCreate("Mean intensities' graph")'Create new plot window
        'Set plot parameters: Style, X and Y labels
  ret = IpPlotSet(plot,"Line, x label=Frames, y label=Intensity")
        'Set the data to plot
  ret = IpPlotData (plot,1,PDT_FLOAT,profdat(0),i)
  ret = IpPlotShow(plot,1)  'Show the plot
  ret = IpAppMenuSelect(0, 7, "", DLG_MENU_COORD)' Send data to Excel
  ret = IpSeqSet(SEQ_ACTIVEFRAME, 0)
End Sub       'End of the macro

阅读全文 | 回复(0) | 引用通告 | 编辑
 


  • 标签:Image pro plus MACRO 
  • 发表评论:
    生物导航网博客欢迎您......



    Powered by Oblog.