summaryrefslogtreecommitdiffstats
path: root/python/astra/extrautils.pyx
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2017-09-15 16:38:08 +0200
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2017-09-15 16:38:08 +0200
commitaa31a06235496c0d808e57c8ce914cb4b640bc6e (patch)
tree33385e828ddca0b2857bac9e3dac4dd3723a3eee /python/astra/extrautils.pyx
parentf6aa2db83dfea89f9d2cfc6fcbd3da141ee77e02 (diff)
parent00a1c6118b2d64b867c8e640c295462bcccfc7c9 (diff)
downloadastra-aa31a06235496c0d808e57c8ce914cb4b640bc6e.tar.gz
astra-aa31a06235496c0d808e57c8ce914cb4b640bc6e.tar.bz2
astra-aa31a06235496c0d808e57c8ce914cb4b640bc6e.tar.xz
astra-aa31a06235496c0d808e57c8ce914cb4b640bc6e.zip
Merge branch 'master' into parallel_vec
Diffstat (limited to 'python/astra/extrautils.pyx')
-rw-r--r--python/astra/extrautils.pyx34
1 files changed, 17 insertions, 17 deletions
diff --git a/python/astra/extrautils.pyx b/python/astra/extrautils.pyx
index 2c7771e..248c6ee 100644
--- a/python/astra/extrautils.pyx
+++ b/python/astra/extrautils.pyx
@@ -3,7 +3,7 @@
# 2013-2016, CWI, Amsterdam
#
# Contact: astra@uantwerpen.be
-# Website: http://sf.net/projects/astra-toolbox
+# Website: http://www.astra-toolbox.com/
#
# This file is part of the ASTRA Toolbox.
#
@@ -26,19 +26,19 @@
def clipCircle(img):
- cdef int i,j
- cdef double x2,y2,mid,bnd
- cdef long sz,sz2
- sz = img.shape[0]
- sz2 = sz*sz
- bnd = sz2/4.
- mid = (sz-1.)/2.
- nDel=0
- for i in range(sz):
- for j in range(sz):
- x2 = (i-mid)*(i-mid)
- y2 = (j-mid)*(j-mid)
- if x2+y2>bnd:
- img[i,j]=0
- nDel=nDel+1
- return nDel
+ cdef int i,j
+ cdef double x2,y2,mid,bnd
+ cdef long sz,sz2
+ sz = img.shape[0]
+ sz2 = sz*sz
+ bnd = sz2/4.
+ mid = (sz-1.)/2.
+ nDel=0
+ for i in range(sz):
+ for j in range(sz):
+ x2 = (i-mid)*(i-mid)
+ y2 = (j-mid)*(j-mid)
+ if x2+y2>bnd:
+ img[i,j]=0
+ nDel=nDel+1
+ return nDel