Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ART #1

Open
Ahme1994 opened this issue Dec 30, 2022 · 1 comment
Open

ART #1

Ahme1994 opened this issue Dec 30, 2022 · 1 comment

Comments

@Ahme1994
Copy link

hello dear;
when I ran the code, I got this problem .

TypeError Traceback (most recent call last)
/var/folders/04/6zwtc3x93jz3v9tkgfbfsk7c0000gn/T/ipykernel_35174/3701552822.py in
5 niter = 2e2
6 bpos = True
----> 7 x_art = ART(A, AT, y, x0, mu, niter, bpos)

/var/folders/04/6zwtc3x93jz3v9tkgfbfsk7c0000gn/T/ipykernel_35174/2609942379.py in ART(A, AT, b, x, mu, niter, bpos)
27
28 def ART(A, AT, b, x, mu=1e0, niter=1e2, bpos=True):
---> 29 ATA = AT(A(np.ones_like(x)))
30
31 for i in range(int(niter)):

/var/folders/04/6zwtc3x93jz3v9tkgfbfsk7c0000gn/T/ipykernel_35174/3663427198.py in (y)
7
8 A = lambda x: radon(x, THETA, circle=False).astype(np.float32)
----> 9 AT = lambda y: iradon(y, THETA, circle=False, filter=None, output_size=N).astype(np.float32)/(np.pi/(2*len(THETA)))
10 AINV = lambda y: iradon(y, THETA, circle=False, output_size=N).astype(np.float32)

TypeError: iradon() got an unexpected keyword argument 'filter'

@Ahme1994
Copy link
Author

Ahme1994 commented Jan 2, 2023

hello dear could you please help to to fix this erorr
A = lambda x: radon(x, THETA, circle=False).astype(np.float32)
print(A)
AT = lambda y: iradon(y, THETA, circle=False, filter=None, output_size=N).astype(np.float32)/(np.pi/(2*len(THETA)))
print(AT)
AINV = lambda y: iradon(y, THETA, circle=False, output_size=N).astype(np.float32)
print(AINV)

DATA GENERATION

x = loadmat('XCAT512.mat')['XCAT512']
p = A(x)
x_full = AINV(p)
+++++++++++++++

AttributeError Traceback (most recent call last)
in
1 ## DATA GENERATION
2 #x = loadmat('XCAT512.mat')['XCAT512']
----> 3 p = A(x)
4 x_full = AINV(p)
5

1 frames
/usr/local/lib/python3.8/dist-packages/skimage/transform/radon_transform.py in radon(image, theta, circle, preserve_range)
65
66 """
---> 67 if image.ndim != 2:
68 raise ValueError('The input image must be 2-D')
69 if theta is None:

AttributeError: 'dict' object has no attribute 'ndim'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant