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

how to use nii_to_png_converter.py #17

Open
shabbirshuvo opened this issue Nov 26, 2021 · 4 comments
Open

how to use nii_to_png_converter.py #17

shabbirshuvo opened this issue Nov 26, 2021 · 4 comments

Comments

@shabbirshuvo
Copy link

shabbirshuvo commented Nov 26, 2021

Hi,
First of all thanks for writing such awesome code for helping others.

Now let's come to my problem. I was trying to use your code for my research. I successfully used "nii2png.py" to convert a single 3D nifti file. But did not find the use of "nii_to_png_converter.py" anywhere in your documentation. Can you please explain how to use it? That would be of great help. Thank you.

Sincerely,
Shabbir

@monjoybme
Copy link
Contributor

@shabbirshuvo This code can be used to convert single/multiple NIfTI image files (.nii or .ni.gz) into .png/JPEG/JPG/TIFF/TIF images. All the raw image data (.nii or .ni.gz) should be in the same folder. This code will create multiple folders with .png/JPEG/JPG/TIFF/TIF images based on the filename. Change rotation angle if required. Default is set to 90.

I recently made some changes in the code and created a PR request, which is still pending by the admin.

If you're using previous code use the below command to run the script:
python3 nii_to_pngs_converter.py --input_path /data/path/to/you/raw_nii/file/path

If you are using the modified code use the below command to run the script. In the modified code I just set the "save_image_path", which was previously "base_path".

python3 nii_to_pngs_converter.py --input_path /data/path/to/you/raw_nii/file/path --save_image_path /path/where/you/want/to/save/the/images

Let me know if you have any doubts. "nii_to_png_converter.py" can be used if you have multiple files.

@monjoybme
Copy link
Contributor

@shabbirshuvo There isn't any response. I'm hoping the problem has been resolved. I'm going to close this case. If you believe the problem has not been rectified, please reopen this ticket.

@Planetdtudy
Copy link

Where I can find how to install nii_to_pngs_converter.py? from the installation described I got only nii2png.py

@monjoybme
Copy link
Contributor

monjoybme commented May 30, 2023

@Planetdtudy You don't need to install nii_to_pngs_converter.py if you have followed installation instructions of nii2png.py. Just run the code by setting the required arguments.

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

3 participants