home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
vis-ftp.cs.umass.edu
/
vis-ftp.cs.umass.edu.tar
/
vis-ftp.cs.umass.edu
/
pub
/
Software
/
ASCENDER
/
ascendMar8.tar
/
UMass
/
ISR
/
patch.lisp
< prev
next >
Wrap
Lisp/Scheme
|
1995-04-11
|
872b
|
23 lines
;;; -*- Mode:Common-Lisp; Package:ISR2; Base:10; Patch-file:T -*-
;;;
;;; So far so good. No patches to date, 6/20/91
;;; Fix pixel-count so that it can take a pixelmap as well as a path to one
;;; -- BAD 6/23/91.
(defun pixel-count (token-pixelmap-path)
(with-lock (*scratch-bitplane-lock*)
(let* ((pixelmap (if (pixelmap-p token-pixelmap-path)
token-pixelmap-path
(value token-pixelmap-path)))
(extents (pixelmap-extents pixelmap))
(bitplane (pixelmap-bitplane pixelmap)))
(check-bitplane-and-extents extents bitplane)
(let ((min-x (minx-of extents))
(max-x (maxx-of extents))
(min-y (miny-of extents))
(max-y (maxy-of extents)))
(clear-scratch-bitplane)
(bitplane-to-scratch-plane extents bitplane :alu tv:alu-seta)
(scratch-bitplane-count (1+ (- max-x min-x)) (1+ (- max-y min-y)) min-x min-y)))))