diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..723ef36 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea \ No newline at end of file diff --git a/README.md b/README.md index b8dfc66..3133b44 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Minimum hardware requirements: - CPU with 6 cores - 16 GB RAM - For GPU-accelerated reconstruction: Nvidia GPU with 12GB video memory - - At least 30GB free disk space + - At least 30GB free disk space Recommended hardware requirements: - CPU with ≥10 cores @@ -58,12 +58,12 @@ git clone --recurse-submodules https://github.com/SVRTK/svrtk-docker-gpu.git /ho ### Option 1 --- Install using pre-built Docker image #### 1.1 Download the pre-built Docker image from DockerHub: ``` -docker pull fetalsvrtk/svrtk:svrtk-docker-gpu-0.10 +docker pull fetalsvrtk/svrtk:pride-svr-docker-0.2.0 ``` #### 1.2 Test the Docker container is working: ``` -docker run -it fetalsvrtk/svrtk:svrtk-docker-gpu-0.10 +docker run -it fetalsvrtk/svrtk:pride-svr-docker-0.2.0 ``` Once inside the container, test MIRTK is working by running: @@ -96,13 +96,13 @@ wget https://gin.g-node.org/SVRTK/fetal_mri_network_weights/raw/master/checkpoin #### 2.3 Build the container using the Dockerfile: ``` -docker build -f svrtk-docker-gpu.Dockerfile -t fetalsvrtk/svrtk:svrtk-docker-gpu-0.10 . +docker build -f svrtk-docker-gpu.Dockerfile -t fetalsvrtk/svrtk:pride-svr-docker-0.2.0 . ``` #### 2.4 Test the Docker container is working: ``` -docker run -it fetalsvrtk/svrtk:svrtk-docker-gpu-0.10 +docker run -it fetalsvrtk/svrtk:pride-svr-docker-0.2.0 ``` Once inside the container, test MIRTK is working by running: @@ -122,7 +122,7 @@ Copy nifti files (labelled `stack1.nii.gz`, `stack2.nii.gz`, ... `stackN.nii.gz` Then: ``` -docker run -v "svrtk-docker-gpu/recon":/home/recon fetalsvrtk/svrtk:svrtk-docker-gpu-0.10 /home/scripts/docker-recon-brain-auto.bash /home/recon +docker run -v "svrtk-docker-gpu/recon":/home/recon fetalsvrtk/svrtk:pride-svr-docker-0.2.0 /home/scripts/docker-recon-brain-auto.bash /home/recon ``` This will output a 3D SVR-reconstructed volume named `SVR-output.nii.gz`. @@ -131,5 +131,5 @@ This will output a 3D SVR-reconstructed volume named `SVR-output.nii.gz`. ##### Optional: If you have successfully installed CUDA, you can run the GPU-accelerated version with: ``` -docker run -it --gpus all -v "svrtk-docker-gpu/recon":/home/recon fetalsvrtk/svrtk:svrtk-docker-gpu-0.10 /home/scripts/docker-recon-brain-auto.bash /home/recon -``` \ No newline at end of file +docker run -it --gpus all -v "svrtk-docker-gpu/recon":/home/recon fetalsvrtk/svrtk:pride-svr-docker-0.2.0 /home/scripts/docker-recon-brain-auto.bash /home/recon +``` diff --git a/recon/pride/SVR/StartSVR.bat b/recon/pride/SVR/StartSVR.bat index cafc627..692cff8 100755 --- a/recon/pride/SVR/StartSVR.bat +++ b/recon/pride/SVR/StartSVR.bat @@ -4,7 +4,7 @@ :: Docker image name (default: svrtk-docker-gpu) set hostName=%COMPUTERNAME% -set "dockerImageName=fetalsvrtk/svrtk:svrtk-docker-gpu-0.10" +set "dockerImageName=fetalsvrtk/svrtk:pride-svr-docker-0.2.0" ECHO Using Docker Image: %dockerImageName% :: Clear TempOutputSeries @@ -46,4 +46,4 @@ if "%hostName%" EQU "PRIDESVR02-PC" ( :: Clean Recon Directory ECHO Cleaning recon directory ... powershell.exe C:\svrtk-docker-gpu\scripts\reconDirClean.bat -ECHO DONE \ No newline at end of file +ECHO DONE diff --git a/recon/pride/SVR/StartSVR_GPU.bat b/recon/pride/SVR/StartSVR_GPU.bat index 679b846..fb98769 100644 --- a/recon/pride/SVR/StartSVR_GPU.bat +++ b/recon/pride/SVR/StartSVR_GPU.bat @@ -4,7 +4,7 @@ :: Docker image name (default: svrtk-docker-gpu) set hostName=%COMPUTERNAME% -set "dockerImageName=fetalsvrtk/svrtk:svrtk-docker-gpu-0.10" +set "dockerImageName=fetalsvrtk/svrtk:pride-svr-docker-0.2.0" ECHO Using Docker Image: %dockerImageName% :: Clear TempOutputSeries @@ -46,4 +46,4 @@ if "%hostName%" EQU "PRIDESVR02-PC" ( :: Clean Recon Directory ECHO Cleaning recon directory ... powershell.exe C:\svrtk-docker-gpu\scripts\reconDirClean.bat -ECHO DONE \ No newline at end of file +ECHO DONE diff --git a/scripts/StartSVR.bash b/scripts/StartSVR.bash index 0e66799..fd90b01 100755 --- a/scripts/StartSVR.bash +++ b/scripts/StartSVR.bash @@ -5,8 +5,8 @@ # Admin userName=$USER -# Docker image name (default: svrtk-docker-gpu) -dockerImageName=fetalsvrtk/svrtk:svrtk-docker-gpu +# Docker image name +dockerImageName=fetalsvrtk/svrtk:pride-svr-docker-0.2.0 dockerImageFolderName=svrtk-docker-gpu echo "Using Docker Image:" $dockerImageName diff --git a/scripts/svr_nii2pridedcm.py b/scripts/svr_nii2pridedcm.py index 1313f7e..b42a951 100755 --- a/scripts/svr_nii2pridedcm.py +++ b/scripts/svr_nii2pridedcm.py @@ -64,6 +64,8 @@ 0x2001101a: ('FL', '3', "PC Velocity", '', 'PCVelocity'), 0x2001101d: ('IS', '1', "Reconstruction Number MR", '', 'ReconstructionNumberMR'), 0x20051035: ('CS', '1', '', '', 'unknowntag20051035'), # PIXEL --- this seems to also correspond to MRSeriesDataType? + 0x20051011: ('CS', '1', 'MR Image Type', '', 'MRImageType'), + 0x2005106e: ('CS', '1', 'MR Scan Sequence', '', 'MRScanSequence'), # Philips "Stack" Tags 0x2001105f: ('SQ', '1','Stack','','Stack'), @@ -463,7 +465,8 @@ def elem_initialise(uid_instance, uid_series_instance, uid_frame_of_reference, n 'NumberOfStacks': 1, 'ReconstructionNumberMR': 2, 'NumberOfDynamicScans': 1, - + 'MRImageType': 'M', + 'MRScanSequence': 'SE', } return elements_to_define_meta, elements_to_transfer_meta, elements_to_define_ds, elements_to_transfer_ds, non_std_elements_to_define_ds @@ -564,7 +567,7 @@ def create_seq_stack(): # override elements setattr(ds, 'SeriesNumber', str(int(str(getattr(dcmIn, 'SeriesNumber'))) + 1) ) # +1 to SeriesNumber - # setattr(ds, 'AcquisitionNumber', str(getattr(dcmIn, 'AcquisitionNumber'))) + setattr(ds, 'AcquisitionNumber', str(getattr(dcmIn, 'SeriesNumber'))[:-2]) # setattr(ds, 'InstanceCreationDate', str(today_date) ) # setattr(ds, 'InstanceCreationTime', str(today_time) ) # setattr(ds, 'SeriesDate', str(today_date) )