Replies: 1 comment
-
I've got it. load_png=T.Compose([
T.LoadImage(image_only=True),
T.AddChannel()
])
img=load_png(path2)
# img={'img':img,''}
spacing_png= T.Spacing(pixdim=(1.5,1.5,3))
affine=np.array([
[1.63,0,0,0],
[0,1.63,0,0],
[0,0,3,0],
[0,0,0,1]
])
img=spacing_png(data_array=img,affine=affine) #nothing happend
# img[0].shape
# img[2]
# resize=T.Resize(sp)
# resize()
img[0].shape |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm dealing with some png images, some with spacing=1.63 and others have a spacing=1.5.I want to unify spacing to 1.5.
my code :
Beta Was this translation helpful? Give feedback.
All reactions