Closed oachk closed 3 years ago
many thanks for reporting this @oachk since it is a bug. It has been fixed now and you can get the fixed version with
conda install -c ccpi/label/dev tomophantom
or install it from the source.
Hello,
Forgot to mention that we have an additional problem, namely that we are running on the latest 1.4 windows version, meaning that updating does not work. I have been trying to access the source code in the site-packages to try and manually change the bug. However, I do not know how to manage the file type "TomoP3D.cp36-win_amd64.pyd" assuming that this the correct file.
I would therefore like to ask, if it would be possible to get the windows version updated with this bug fix as well, or how one would go about it to solve the problem manually.
Best regards, Philip
@Philipstj can you tell me which version of Python and numpy you're using? We're currently having some issues with Windows builds but I can build it for you.
Yes, no problem the Python version is 3.6.12 and 1.14.6 for NumPy.
Install the latest Windows version using this conda install -c dkazanc tomophantom
In fact you might want to use that in future since it gets updated more frequently for Windows. We might add this info in the Readme.
Many thanks for the help, and sorry for the inconvenience caused.
@Philipstj no worries at all, thanks for using the package ;)
Hi! I'm trying to make a phantom with several cylinders, but somehow they just don't show up, even though I don't get an error message. I've also noticed that the name in the Objects3D class is apparently not elliptical_cylinder (as suggested in the model examples) but rather ELLIPCYLINDER?
Here's a snippet of my code:
`import sys import os sys.path.append(os.path.dirname(os.path.realpath(file))+"\Functions") import helpers_data import numpy as np import matplotlib.pyplot as plt from tomophantom import TomoP3D from tomophantom.TomoP3D import Objects3D import tomophantom
N3D_size = 128*5 obj3D_1 = {'Obj': Objects3D.ELLIPCYLINDER, 'C0' : 1, 'x0' : 0, 'y0' : 0, 'z0' : 0, 'a' : 0.5, 'b' : 0.5, 'c' : 1, 'phi1' : 0}
Object3D = TomoP3D.Object(N3D_size, obj3D_1)
print ("Building 3D object using TomoPhantom software")
sliceSel = int(0.5*N3D_size)
plt.figure() plt.subplot(131) plt.imshow(Object3D[sliceSel,:,:],vmin=0, vmax=1) plt.title('3D Object, axial view')
plt.subplot(132) plt.imshow(Object3D[:,sliceSel,:],vmin=0, vmax=1) plt.title('3D Object, coronal view')
plt.subplot(133) plt.imshow(Object3D[:,:,sliceSel],vmin=0, vmax=1) plt.title('3D Object, sagittal view') plt.show()`