vcasellesb / stl2nii

.stl to .nii(.gz) file converter
Do What The F*ck You Want To Public License
1 stars 0 forks source link

The result is not quite right #1

Open UsersNGT opened 4 months ago

UsersNGT commented 4 months ago

thanks your works, i have one stl file label, want to convert .nii file. i only Modify the following code。but result is not quite。 image

vcasellesb commented 4 months ago

Hi,

From what I can gather from your screenshot, you are trying to run the code on a single .stl file. You don't need to change anything in the code to do that. For example, you can just run it like this:

 python3 /path/to/stl2nii -i /path/to/single/stlfile.stl -ref /path/to/reference/image.nii  \ 
-o /desired/output/folder

I hope I was clear. Best regards, Vicent

UsersNGT commented 4 months ago

thank you reply. i use you recommand but result not right. image

the result follow screenshot. Mostly empty。 image

vcasellesb commented 4 months ago

Which file are you loading? .vtk or .nii.gz? Besides, I see that you are calling a file called stl2nii.py, and there is no such file in my code. Please, either call __main__.py or call the folder that contains __main__.py.

Anyways, if you want to, you can send the .stl file you are trying to convert to this email adress: xxxxxxxxxxxx@gmail.com

so I can try to figure out how to fix it.

Thank you for your patience

UsersNGT commented 4 months ago

thanks you reply. i loading.nii.gz file with itksnap. i am Sorry that the data cannot be sent to you. the following screenshot is.stlfile loaded with 3D slicer. image

vcasellesb commented 4 months ago

Could you try and load the .nii.gz file using Slicer and show me the results?

Besides that, have you tried calling the stl2nii directory or __main__.py instead, as I pointed out before?

Thanks.

vcasellesb commented 4 months ago

Hi @UsersNGT , have you been able to revisit this? Please note that thanks to another issue the time to process each stl has been vastly reduced, so please update your code!

Best, Vicent