pyushkevich / itksnap

ITK-SNAP medical image segmentation tool
http://www.itksnap.org
GNU General Public License v3.0
287 stars 84 forks source link

Hello, is there any way to load corresponding label nii file automatically? #70

Open xh542428798 opened 1 year ago

xh542428798 commented 1 year ago

Hello, I am a researcher using Itk for more than two years, I love itksnap, now I have many patients' data needed be checked, I wonder is there anyway to open image nii and label nii simultaneously, without any comfirmed button?

dhinkris commented 1 year ago

Hi @xh542428798 , You should be able to open them through CLI iteratively. In your case you need use -g -s

This is from a MAC OS. Linux distributions works the same. I am not sure about Windows. Below is the usage:

/ITK-SNAP.app/Contents/bin/itksnap --help ITK-SnAP Command Line Usage: /Applications/ITK-SNAP.app/Contents/MacOS/ITK-SNAP [options] [main_image] Image Options: -g FILE : Load the main image from FILE -s FILE : Load the segmentation image from FILE -l FILE : Load label descriptions from FILE -o FILE [FILE+] : Load additional images from FILE : (multiple files may be provided) -w FILE : Load workspace from FILE : (-w cannot be mixed with -g,-s,-l,-o options) Additional Options: -z FACTOR : Specify initial zoom in screen pixels/mm --cwd PATH : Start with PATH as the initial directory --threads N : Limit maximum number of CPU cores used to N. --scale N : Scale all GUI elements by factor of N (e.g., 2). --geometry WxH+X+Y : Initial geometry of the main window. Debugging/Testing Options: --debug-events : Dump information regarding UI events --test list : List available tests. --test TESTID : Execute a test. --testdir DIR : Set the root directory for tests. --testacc factor : Adjust the interval between test commands by factor (e.g., 0.5). --css file : Read stylesheet from file. --opengl MAJOR MINOR : Set the OpenGL major and minor version. Experimental. --testgl : Diagnose OpenGL/VTK issues. Platform-Specific Options:

Thank you.

pyushkevich commented 1 year ago

Another option is to use itksnap-wt in a script to generate workspace files (one workspace for each patient, using commands like -laa, -las, -o) and then open each workspace at a time (double clicking or commandline, itksnap-wt)

Paul

On Tue, Nov 22, 2022 at 6:15 AM Hui Xie @.***> wrote:

Hello, I am a researcher using Itk for more than two years, I love itksnap, now I have many patients' data needed be checked, I wonder is there anyway to open image nii and label nii simultaneously, without any comfirmed button?

— Reply to this email directly, view it on GitHub https://github.com/pyushkevich/itksnap/issues/70, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJPEW3PWUH3NJEV6ZEIJUTWJSTMBANCNFSM6AAAAAASHVZZZI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

xh542428798 commented 1 year ago

Thanks a lot, let me have a try