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

if I just want to generate thin slice CTs,how can I do? #20

Open
joelive opened this issue Jul 15, 2022 · 1 comment
Open

if I just want to generate thin slice CTs,how can I do? #20

joelive opened this issue Jul 15, 2022 · 1 comment

Comments

@joelive
Copy link

joelive commented Jul 15, 2022

Just remove the SCALING_FACTOR for x and y, and keep the SCALING_FACTOR for z, Will it work if I just want to generate thin slice CTs?
lr_image = tf.image.resize(blurred_image, [x//SCALING_FACTOR, y//SCALING_FACTOR], method=interpolation_method).numpy()
lr_image = np.rot90(lr_image, axes=(1,2))
lr_image = tf.image.resize(lr_image, [x//SCALING_FACTOR, z//SCALING_FACTOR], method=interpolation_method).numpy()
ups_lr_image = tf.image.resize(lr_image, [x//SCALING_FACTOR, z], method=interpolation_method).numpy()
ups_lr_image = np.rot90(ups_lr_image, axes=(1,2))

@omagdy
Copy link
Owner

omagdy commented Aug 25, 2022

Hi @joelive

Im not sure I understand your question particularly what you mean by thin slices. Do you want to train the model for upscaling a 3d image only on the X and Y axes and leave the Z axis as it is (i.e no upscaling on the Z dimension) ?

If thats the case then you should still do scaling on the X and Y while removing the scaling from Z. This way the high and low resolution versions of the same image will only differ in the X and Y dimension (based on the scaling factor) while they will still have the value in the Z dimension.

Let me know if you still need clarification.

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

2 participants