📄 rfwtvaint.cwp.lib
字号:
RFWTVAINT - Rasterize a Float array as Wiggle-Trace-Variable-Area, with 8 point sinc INTerpolation.rfwtvaint rasterize a float array as wiggle-trace-variable-area, and apply sinc interploation for display purposes.Function Prototype:void rfwtvaint (int n, float z[], float zmin, float zmax, float zbase, int yzmin, int yzmax, int xfirst, int xlast, int wiggle, int nbpr, unsigned char *bits, int endian);Input:n number of samples in array to rasterizez array[n] to rasterizezmin z values below zmin will be clippedzmax z values above zmax will be clippedzbase z values between zbase and zmax will be filled (see notes)yzmin horizontal raster coordinate corresponding to zminyzmax horizontal raster coordinate corresponding to zmaxxfirst vertical raster coordinate of z[0] (see notes)xlast vertical raster coordinate of z[n-1] (see notes)wiggle =0 for no wiggle (VA only); =1 for wiggle (with VA) wiggle 2<=wiggle<=5 for solid/grey coloring of VA option shade of grey: wiggle=2 light grey, wiggle=5 blacknbpr number of bytes per row of bitsbits pointer to first (top,left) byte in imageendian byte order =1 big endian =0 little endian Output:bits pointer to first (top,left) byte in imageNotes:The raster coordinate of the (top,left) bit in the image is (0,0).In other words, x increases downward and y increases to the right.Raster scan lines run from left to right, and from top to bottom.Therefore, xfirst, xlast, yzmin, and yzmax should not be less than 0.Likewise, yzmin and yzmax should not be greater than nbpr*8-1, and care should be taken to ensure that xfirst and xlast do not cause bits to be set outside (off the bottom) of the image. Variable area fill is performed on the right-hand (increasing y) sideof the wiggle. If yzmin is greater than yzmax, then z values betweenzmin will be plotted to the right of zmax, and z values between zbaseand zmin are filled. Swapping yzmin and yzmax is an easy way to reverse the polarity of a wiggle.The variable "endian" must have a value of 1 or 0. If this isnot a case an error is returned.The interpolation is by the 8 point sinc interpolation routine s8r.Author: Dave Hale, Colorado School of Mines, 07/01/89 Memorial University of Newfoundland: Tony Kocurko, Sept 1995. Added sinc interpolation.MODIFIED: Paul Michaels, Boise State University, 29 December 2000 added solid/grey color scheme for peaks/troughs wiggle=2 option
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -