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

Replaced sct.mv with shutil.copyfile for tmp space issue #2420

Merged
merged 3 commits into from Aug 23, 2019
Merged

Replaced sct.mv with shutil.copyfile for tmp space issue #2420

merged 3 commits into from Aug 23, 2019

Conversation

baxpr
Copy link
Contributor

@baxpr baxpr commented Aug 22, 2019

Use copy instead of move for fmri_moco_params.tsv in sct_fmri_moco.py to avoid the below error when running in a Singularity container.

Traceback (most recent call last):
  File "/opt/sct/scripts/sct_fmri_moco.py", line 452, in <module>
    main()
  File "/opt/sct/scripts/sct_fmri_moco.py", line 225, in main
    sct.mv(os.path.join(path_tmp, 'fmri_moco_params.tsv'), os.path.join(path_out + file_data + param.suffix + '_params.tsv'))
  File "/opt/sct/scripts/sct_utils.py", line 421, in mv
    os.rename(src, dst)
OSError: [Errno 18] Invalid cross-device link: '/tmp/sct-20190821183953.774530-fmri_moco-kvn3v5rh/fmri_moco_params.tsv' -> './fmri_moco_params.tsv'

Fixes #2419

Tested and working for me.

Copy link
Member

@jcohenadad jcohenadad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution! 🏅

@jcohenadad jcohenadad added bug category: fixes an error in the code sct_fmri_moco context: labels Aug 22, 2019
@jcohenadad jcohenadad added this to the 4.0.2 milestone Aug 22, 2019
@jcohenadad jcohenadad changed the title sct_fmri_moco.py replace sct.mv with shutil.copyfile for tmp space issue Replaced sct.mv with shutil.copyfile for tmp space issue Aug 22, 2019
@jcohenadad jcohenadad merged commit feb52ad into spinalcordtoolbox:master Aug 23, 2019
@baxpr baxpr deleted the baxpr/mvfix branch October 2, 2019 00:12
jcohenadad pushed a commit that referenced this pull request Dec 18, 2019
* sct_fmri_moco.py replace sct.mv with shutil.copyfile for tmp space issue

* sct_fmri_moco.py remove excess tab

* Need to import shutil


Former-commit-id: ddc9f3b58aff2ed5a301482e20ffe7bac808e492 [formerly 20d788e [formerly feb52ad]]
Former-commit-id: 95d60f90a3ef4b6b18e683b150d828ac12addd3a
Former-commit-id: 77152e6
jcohenadad added a commit that referenced this pull request Dec 18, 2019
* Changed source of nipy installation to fork (#2269)

* requirements.txt: changed source of nipy installation to fork

* sct_check_dependencies.py: Added entry for forked nipy


Former-commit-id: 40612c80b3c3f5de496b617be55f6f31c156f7a0

* Output DTI Eigenvalues (#2274)

* sct_dmri_compute_dti: Fixed conversion bug for evecs flag

* sct_dmri_compute_dti: Now outputs eigenvalues with flag evecs


Former-commit-id: 5a3302bd7f634f2d6fd9920418335770a4f04268

* straightening.py: Fixed wrong scaling factor for output XY size (#2268)



Former-commit-id: c35fa32e56b8f5d4c908f82a8fc68b62a1c46d39

* Fixed Keras/Tensorflow compatibility with CentOS 7 by downgrading to Python 3.6 (#2276)

* sct_check_dependencies: No more failing if data folder does not exist

* install_sct: Switching to Py3.6 for SCT install

Fixes #2270

* .travis.yml: Activating the correct py36 in Travis

* install_sct: Removed option to bypass conda re-install

flag -m

* install_sct: Renamed venv for something more generic

* .travis.yml: Replace py36 for venv name more generic


Former-commit-id: a5d27219c30820c41712df7448521376ffce7faa

* Added output file and/or folder flag (#2264)

* sct_compute_mtr: Add flag to set output filename and location (fixes #2178)

* sct_compute_mtr: fixed case where fsleyes command would not open output file if its location had changed (fixes #2178)

* sct_compute_mtr: fixed formatting of code and comments (fixes #2178)

* sct_compute_mtr: removed undefined variable 'param' when defining flag '-omtr' (fixes #2178)

* sct_compute_mtr: redefined '-omtr' to '-o'  to respect conventions (fixes #2178)

* sct_compute_mtr: changed description for '-o' by specifying to add extension '.nii.gz'. (fixes #2178)

* sct_compute_mtr: changed example for '-o' argument for a more concrete one (fixes #2178)

* sct_compute_mtr: added extension to default value for '-o' argument (fixes #2178)

* sct_compute_mtr: removed addition of extension of file to prevent it being present twice in a row in output name (fixes #2178)

* sct_compute_mtr: removed notification about moving location before using command 'fsleyes'(fixes #2178)

* sct_compute_mtr: moved shutil import to the top (fixes #2178)

* sct_compute_mtr: removed ".nii.gz" when specifying extension in description of argument '-o' (fixes #2178)

* sct_compute_mtr: modified code to respect convention of file_out not including extension.

* sct_compute_mtr: removed temporary folder steps and simplified argument variables

* sct_compute_mtr: fixed case where outputting a .nii.gz file would fail

* sct_compute_mtr: removed steps where mt0.nii and mt1.nii would be copied

* sct_compute_mtr: fixed case where mt0 and mt1 files were not set to predetermined values

* sct_compute_mtr: removed variables ext_out and file_out

* sct_compute_mtr: fixed case where fsleyes viewing command could not be issued from cwd

* sct_compute_mtr: removed remnant step from temporary folder process

* sct_compute_mtr: removed redundant generate_output_file step

* sct_compute_mtr: removed '-r' argument in get_parser()


Former-commit-id: a1aae053e6669cbb1870ad4dc478b185af6e676c

* update applications


Former-commit-id: c0b4ceb8591cb6ac88bdbfa56dd28b8bc6b2ffdc

* update applications


Former-commit-id: 4f22bd4176428763397840ce407fc0df74342e6d

* sct_label_utils:adds possibility to remove or keep labels by specifying values (fixes #2247)


Former-commit-id: abd5cc287fea05835d0b120d814ab1caa0d6f7ec

* sct_label_utils:changed function name remove_specific_labels to remove_labels


Former-commit-id: 59747a751482a08228783fec1cbc9623d988a3d9

* sct_label_utils:changed flags -remove-specifc and -keep-specific to -remove-reference and -keep


Former-commit-id: c158f655d45706726d0e3173caf81ced17b1ac84

* sct_label_utils: swapped flags '-remove' and '-remove-reference' '


Former-commit-id: bce701a2843c85bf6686287dcdf5025df771929a

* sct_label_utils: changed remove_labels for remove_or_keep_labels(self.value, action={'keep', 'remove'})


Former-commit-id: ec624a5d324d90bcddf03897b78c861cb55abc82

* sct_label_utils: changed action={'remove','keep'} to action


Former-commit-id: b44f4aada698506532185d6dbdf7efddb9e52553

* sct_label_utils: added docstrings to function remove_or_keep_labels


Former-commit-id: 51f1c09f449fafd9ca7b87e84c24677c31c61bd3

* sct_label_utils: simplified docstrings for function remove_or_keep_labels


Former-commit-id: 27c700992bff146fca6ce8cadf22c644974e872e

* sct_label_utils: simplified type_process selection for flags -remove and -keep


Former-commit-id: 8de7cfb2192c7fed743283aee806418ea6fd502b

* sct_label_utils: modified docstring for function remove_or_keep_labels


Former-commit-id: 0fe767df0718e84e21a26f1ca21a444364431075

* sct_label_utils: changed ERROR message for WARNING if label not found


Former-commit-id: f75394b463cd605187f387113e577ffd1f25f94e

* sct_label_utils: changed else condition for elif action == 'remove'


Former-commit-id: cd2960958c1f2a4215d14b7b53d21f5db8d9d096

* sct_label_utils: changed formatting for conditions defining value of image_output


Former-commit-id: 70d3f2e11c5153c5cd3a576a930e66dd48291ca7

* sct_register_to_template: changed -remove flag for -remove-reference


Former-commit-id: e496c0d6d3dff5e6524bb01ba4e2cf61ef1fb4c6

* Fixed resampling method with reference image and improved speed for generating QC report (#2285)

* sct_resample: Added flag -ref to resample image to ref coordinates

* resampling: Added possibility to resample image to reference image

* resampling: Fixed issue when using ref image for resampling

See: https://github.com/neuropoly/spinalcordtoolbox/issues/2284

* reports/slice: Faster generation of QC report using ref for resample

* reports/slice: Improved speed

* reports/qc: Add logger verbose

* reports/slice: Add logger verbose

* reports/slice: Fixed shadows built-in name 'type'

* reports/slice: Fixed issue with dimension

* resampling: Fixed positional argument

* sct_resample: Fixed positional argument

* reports/slice: Added TODO about resampling

Former-commit-id: 6b5580fbfc29f1191f677212aeced71cb85fe8e8

* CHANGES.md: Updated for v4.0.0-beta.5 (#2280)



Former-commit-id: 8a8f7a5fd26c7bb32c52f29fe8e60ddd93685bce

* Fixed misplaced label in non-RPI data for initializing vertebral labeling (#2289)

* sct_label_vertebrae: Replaced local func with ProcessLabels (WIP)

from sct_label_utils

* msct_types: Added comments

* image: Added comments

* msct_types: Implemented permute() to permute coordinate between orientations

* sct_label_utils: Fixed create-seg if input image is not RPI

Related to #2236

* sct_label_utils: Added TODO about dilate

* sct_label_vertebrae: Fixed initz if image is non-RPI

* sct_label_utils: Fixed regression bug for display mode


Former-commit-id: 3f075601f74c4b1b7890383bccb2f64130f50b3d

* BUG: Fixed #2258 (straightening with nurbs) (#2292)



Former-commit-id: a9d57c9d1e6d4101f6e3ec16e6cd3ee5872ba88e

* index.html:changed formatting of buttons


Former-commit-id: 3b35c5c28c916dd13f637434ac978ec26af8eedf

* index.html: added comments to the functions and modified formatting of buttons


Former-commit-id: 99857015e819f6f3e6ff98f25d6eda654c3f48df

* Added automatic data sorting in the QC report (#2295)

Automatically sorting by date after loading index.html (see #2282)

* Added table attributes  data-sort-name="moddate" and data-sort-order="asc" in index.html

Former-commit-id: 87d49aec1733ce947ec8de987c5ef869ffb5a692

* sct_label_vertebrae: input verbose when calling detect_c2c3


Former-commit-id: 2a9b01e0b1e765bccd4b017325266666e8313c74

* detect_c2c3: logging info about temp folder path for debugging


Former-commit-id: 481ca130a97bdcb27ffc91e03b2f1645d78b90c7

* sct_label_vertebrae: quit if detect_c2c3 fails


Former-commit-id: 3a9ed39e4c4714f826a9f38496c6db39791b3f4c

* deepseg_sc: change output data type to uint8


Former-commit-id: d6b11bfffe2c3e824987cf01a2776f9ecaa15f8b

* deepseg_lesion: change output data type to uint8


Former-commit-id: 34bae6f205ff7fe407165ae3b62d7aec9d7efbd1

* index.html: changed buttons for a dropdown menu


Former-commit-id: 7d540deb8fb4886f996ebda4692776ebd30211f3

* sct_label_vertebrae: verbose_detect_c2c3


Former-commit-id: fcf8fede211c850e91cd6a29ade8d193bde6bffd

* detect_c2c3: documentation debug trick


Former-commit-id: 1d5a335320c79f9bebd8d7842be9737372e0afa0

* Update CONTRIBUTING.rst

Former-commit-id: d35f3c2b7304e3f2c45df1e70a6af6f11a102d59

* Update CONTRIBUTING.rst

Former-commit-id: d6099da00abda0dc958f4d1649689ee5006a9075

* index.html: Modified inner content and placement of dropdown menu


Former-commit-id: dd1ea92618741d2f0692a39b14b78c46d4716041

* Travis: Adding distribs and displaying allow_failures (#2298)

* .travis.yml: Added Sierra distrib

* .travis.yml: Moved Sierra build to allow_failures

*  .travis.yml: Fixed job completion for allow_failures


Former-commit-id: 4a7324490a0c5be985e8b922b15ac5683db10a66

* index.html: added feature to hide many columns without the dropdown closing


Former-commit-id: 2a11cd62c8d13e9664c7975a78547b504442cc64

* index.html: removed unnecessary script tags


Former-commit-id: 64a7d15b195c8b4f10a4dc70e7a80aa52f96d6cf

* index.html: changed design of Hide Columns button


Former-commit-id: 698b99ad1b83c69bd7c3662c682c541f3b36c30e

* index.html: added carriage return


Former-commit-id: 156df39d228c7d127a52204e1ff903b3b43a1750

* index.html: renamed unclear variable name  x for buttonPosition


Former-commit-id: a2eed0e414219f893de0444a8cbe2c0dc1110cf0

* index.html: Changed button "Hide Columns" for "Display Columns"


Former-commit-id: a6c2be2cd9a4295706483df07e1f749bfcf21cbf

* index.html: Added more columns that are hidden when page is loaded


Former-commit-id: 5435cc5d13fb3edcf69847821037cf4ab58d2d89

* index.html: Changed default labels for dropdown-menu and table


Former-commit-id: d5fa92fc96481730973f7cbfb7e91288565f415d

* index.html:Changed link for "About" link


Former-commit-id: 0267460eaa5e95a935ffc51d6037ef8771a48d91

* index.html:Dropdown menu closes if user presses button or  outside of dropdown-menu  while open


Former-commit-id: 2f73396cd62c704e8b06186c87c006e566ae0913

* index.html:Updated description for time delay event listener


Former-commit-id: 78f2832478be4113b5527799cc063be9b9d7ce59

* index.html:Changed description for "display" button event listener


Former-commit-id: 4c2ae78838ed8496c88afeb6dfd78a9f29090979

* Added flag to combine all labels (#2291)

* sct_extract_metric: Cleanup

* sct_extract_metric: Cleanup

* sct_extract_metric: Raise RunTimeError in case input label does not exist

* aggregate_slicewise: Enabled to combine labels and fix MAP estimation

In the previous implementation, for MAP, the ML estimation was using the first label of the combined labels. For example, if user asked for metric in the spinal cord, the beta_0[0] (from ML) would be only based on the first label (WM), not on all the labels (in that case, WM + GM).

* sct_extract_metric: Enabled combination of labels with flag -combine

* aggregate_slicewise: Now compatible for n-dim

* test_aggregate_slicewise: Added tests for combined metrics

* test_aggregate_slicewise: Removed sct_utils call

* test_aggregate_slicewise: Added approx (otherwise it fails)


Former-commit-id: de3bd1f0336aa87ecade89c4308638cd30de1958

* index.html:Changed description for body event listener and setTimeout function.


Former-commit-id: 085ed4d48e8f3d6594840a33cf4529f6fc0b09d5

* index.html: Fixed code formatting for table header

Former-commit-id: 727f1212373cf210e13dbadbed7879ae4386d87f

* index.html:Modified order of dropdown-menu to match table header order and corrected data-field for "Path" column


Former-commit-id: 3b16529a203c205e2a2ffe6c04c67f2ac5e920d5

* index.html: Readded carriage returns after div closing tags


Former-commit-id: a6814a17bd6d36e36ff4735272f63a1d1370ba30

* Fixed compatibility of skimage.regionprop on OSX Sierra (#2308)

* process_seg: Do not fetch skimage.regionprop on Sierra OSX

Fixes #2307

* .travis.yml: Added El Capitan (allow failure)

also removed allow failure for Trusty and Sierra

* .travis.yml: Fixed syntax for allow_failures

* test_process_seg: No more checking for solidity

because of: https://github.com/neuropoly/spinalcordtoolbox/pull/2308


Former-commit-id: bad865eedc8575b5acf2407340ebe8209152ba4c

* utils: PEP8 cleanup

Former-commit-id: c162991defd26a8766431adf35ef5e3a1dfe21e4

* sct_utils: Display SCT version on CLI call


Former-commit-id: d97b2bbee8c34bc266d8894356d33728440e7c24

* Fixed compatibility with OSX 10.11 (El Capitan) (#2309)

* requirements.txt: Added tensorflow install condition for OSX 10.11

* requirements.txt: Fixed Darwin version

* process_seg: Added Darwin-15 (El Capitan) to avoid solidy calculation

Related to https://github.com/neuropoly/spinalcordtoolbox/issues/2307

* sct_check_dependencies: Now accounts for conditions in requirements

* .travis.yml: No more allowing failure for El Capitan


Former-commit-id: defa3a242607aa18ebc3d8ca1116c96a5aea2c79

* Add CSA results on QC report  (#2306)

* sct_process_segmentation: Added QC feature (WIP)

* reports/qc: Added QC feature for metrics (WIP)

* reports/qc: Fixed flipping between bkg and overlay image

* sct_process_segmentation: Moved figure generation inside parent function

* reports/qc: Automatically get image shape

* sct_process_segmentation: Minor fix

* reports/qc: Fixed typo


Former-commit-id: 567a67e2508704061e348d20b54cbb7963f20daa

* index.html: Fixed bug where undisplayed columns were still searchable (fixes #2317)


Former-commit-id: ff711f4084fb5413ae555717146fd58e8cb0fe36

* index.html: Corrected starting value of 'data-searchable' on page load


Former-commit-id: 92bf3d2de5517eb9b4084bda2ebce04b2d8ce3b7

*  style.css: Added formatting for searchbar and dropdown menu bar ancestor


Former-commit-id: a1c09cdf3d66ddba6deb77de481a1d185706f58c

* index.html: Changed search display process


Former-commit-id: 95d56f68ec0e285185172081031035b2c767e7be

* index.html: Added color to row with no matching results message


Former-commit-id: e0361c6cd2938681d76e07c8861bcd0945e2a161

* Update references (#2324)

* add reference

* remove space


Former-commit-id: 07175f096712e2fd11a22835242854067b94a15b

* modification for gui utilisation (#2325)



Former-commit-id: f22151d46642746a885d3f3a57177a41bcf24fd2

* Fixed mishandling of columns when sorting (#2326)

* index.html: Removes columns that are not supposed to be displayed when sorting them (fixes #2323)

* style.css: Added formatting parameters for the new classes added in index.html


Former-commit-id: 222673d7b62936390c2ba872e12154e4a07cf82d

* Import python modules located under scripts/ (#2335)

* .gitignore: Added .eggs/

* msct_types.py: Moved to spinalcordtoolbox/types.py

* Replaced msct_types by new module types

* image: Added scripts/ to python env


Former-commit-id: 5ae098e3c257823853b404539760360e22ce2551

* Conversion from msct_parser to argparse (#2315)

* sct_concat_transfo: Added mandatory arguments section

* sct_convert: Added mandatory arguments section

* sct_create_mask: Added mandatory arguments section

* sct_compute_hausdorff_distance: Conversion msct_parser to argparse (contribution to issue #1548)

* sct_compute_mscc: Conversion msct_parser to argparse (contribution to issue #1548)

* sct_compute_mtsat: Changing order of argument display "-h"/"--help".

* sct_compute_mtsat: Changed usage message file name

* sct_compute_mtsat: Fixed formatting of usage message file name

* sct_compute_mtsat: Changed name of program

* sct_testing: Removed functions that had been changed to argparse but not removed from tests

* sct_testing: Temporarily removed functions that function call scripts converted to argparse

* sct_compute_mtsat: Automatized file name acquisition

* sct_compute_mtsat: Changed string method for 'prog' acquisition

* sct_analyze_lesion: Changed order display for mandatory and optional arguments

* sct_analyze_lesion: Modified formatting of description

* sct_analyze_texture: Changed order of mandatory and optional arguments when displayed with -help

* sct_apply_transfo: Changed order of mandatory and optional arguments when displayed with -help

* sct_analyze_lesion: Removed unnecessary example for help of -r argument

* sct_analyze_texture: Removed unnecessary example for help of -r argument

* sct_apply_transfo: removed unncessary example from help of certain arguments

* sct_compute_ernst_angle: Changed mandatory and optional arguments display order when called with -help

* sct_compute_hausdorff_distance: Changed mandatory and optional arguments display order when called with -help

* sct_compute_mscc: Changed mandatory and optional arguments display order when called with -help

* sct_compute_mtr: Changed mandatory and optional arguments display order when called with -help

* sct_compute_snr: Changed mandatory and optional arguments display order when called with -help

* sct_concat_transfo: Changed mandatory and optional arguments display order when called with -help

* sct_concat_transfo: removed example from -v argument

* sct_convert: Changed mandatory and optional arguments display when called with -help

* sct_create_mask: Changed mandatory and optional arguments display when called with -help

* sct_create_mask: Changed required arguments group name

* sct_crop_image: Changed mandatory and optional arguments display when called with -help

* sct_crop_image: Modified help display examples

* sct_check_dependencies: Added optional -help display option

* sct_analyze_lesion: Changed example syntax

* sct_analyze_texture: Changed example syntax

* sct_apply_transfo: Changed example syntax

* sct_analyze_lesion: Corrected spacing for example

* sct_compute_ernst_angle: Corrected spacing for example

* sct_compute_hausdorff_distance: Corrected example syntax

* sct_compute_snr: Corrected example syntax

* sct_concat_transfo: Corrected example syntax

* sct_convert: Corrected example syntax

* sct_create_mask: Corrected example syntax

* sct_crop_image: Corrected example syntax

* sct_analyze_lesion: Improved visual output of description

To fit within 80 columns

* sct_analyze_lesion: Switch quote style for visual output

* sct_analyze_lesion: Display help if no input arguments

* sct_analyze_lesion: Capitalized group names for clarity

* sct_analyze_lesion: Use metavar field to silence variable name

* sct_analyze_texture: Fixed indentation within code

* sct_analyze_texture: Switch quote style for visual output

* sct_analyze_texture: Display help if no input arguments

* sct_analyze_texture: Capitalized group names for clarity

* sct_analyze_texture: Corrected quote style for visual output

* sct_analyze_texture: Use metavar field to silence variable name

* sct_apply_transfo: Switch quote style for visual output

* sct_apply_transfo: Display help if no arguments

* sct_apply_transfo: Capitalized group names for clarity

* sct_apply_transfo: Use metavar field to silence variable name

* scripts/sct_analyze_texture.py: typo

* sct_apply_transfo: Fixed indentation of arguments within code

* sct_check_dependencies: Fixed indentation of arguments in code

* sct_compute_ernst_angle: Fixed indentation of arguments in code

* sct_compute_ernst_angle: Switch quote style for visual output

* sct_compute_ernst_angle: Display help if no arguments

* sct_compute_ernst_angle: Capitalized group names for clarity

* sct_compute_ernst_angle: Use metavar field to silence variable names

* sct_compute_hausdorff_distance: Fixed indentation of arguments in code

* sct_compute_hausdorff_distance: Switch quote style for visual output

* sct_compute_hausdorff_distance: Display help if no arguments

* sct_compute_hausdorff_distance: Use metavar field to silence variable names

* sct_compute_hausdorff_distance:  Capitalized group names for clarity

* sct_compute_mscc: Fixed indentation of arguments in code

* sct_compute_mscc: Switch quote style for visual output

* sct_compute_mscc:  Display help if no arguments

* sct_compute_mscc: Use metavar field to silence variable names

* sct_compute_mscc: Capitalized group names for clarity

* sct_compute_mtr: Fixed indentation of arguments in code

* sct_compute_mtr: Display help if no arguments

* sct_compute_mtr: Use metavar field to silence variable names

* sct_compute_mtr: Capitalized group names for clarity

* sct_compute_mtsat: Fixed indentation of arguments in code

* sct_compute_mtsat: Display help if no arguments

* sct_compute_mtsat: Use metavar field to silence variable names

* sct_compute_mtsat: Capitalized group names for clarity

* sct_create_mask: Added carriage returns in -p argument description

* sct_compute_snr: Fixed indentation of arguments in code

* sct_compute_snr: Switch quote style for visual output

* sct_compute_snr: Display help if no arguments

* sct_compute_snr: Use metavar field to silence variable names

* sct_compute_snr: Capitalized group names for clarity

* sct_concat_transfo: Fixed indentation of arguments in code

* sct_concat_transfo: Switch quote style for visual output

* sct_concat_transfo: Display help if no arguments

* sct_concat_transfo: Use metavar field to silence variable names

* sct_concat_transfo: Capitalized group names for clarity

* sct_convert: Fixed indentation of arguments in code

* sct_convert: Switch quote style for visual output

* sct_convert: Display help if no arguments

* sct_convert: Use metavar field to silence variable names

* sct_convert: Capitalized group names for clarity

* sct_create_mask: Fixed indentation of arguments in code

* sct_create_mask: Switch quote style for visual output

* sct_create_mask: Display help if no arguments

* sct_create_mask: Use metavar field to silence variable names

* sct_create_mask: Capitalized group names for clarity

* sct_create_mask: Changed text for argument '-p'

* sct_crop_image:  Fixed indentation of arguments in code

* sct_crop_image:  Switch quote style for visual output

* sct_crop_image:  Display help if no arguments

* sct_crop_image:  Use metavar field to silence variable names

* sct_crop_image: Capitalized group names for clarity

* msct_types: introduced enum into script

* sct_analyze_lesion: object names added to arguments in help display

* sct_analyze_texture: object names added to arguments in help display

* sct_apply_transfo: object names added to arguments in help display

* sct_compute_ernst_angle: object names added to arguments in help display

* sct_compute_hausdorff_distance: object names added to arguments in help display

* sct_compute_mscc: object names added to arguments in help display

* sct_compute_mtr: object names added to arguments in help display

* sct_compute_mtsat: object names added to arguments in help display

* sct_compute_snr: object names added to arguments in help display

* sct_concat_transfo: object names added to arguments in help display

* sct_convert: object names added to arguments in help display

* sct_create_mask: object names added to arguments in help display

* sct_crop_image: object names added to arguments in help display

* msct_types: removed Enum class for parser argument object definition in help display

* utils.py: Added class Metavar for display of object definition of parser arguments in help display

* sct_analyze_lesion: Changed class for object definition in help display

* sct_analyze_texture: Changed class for object definition in help display

* sct_apply_transfo: Changed class for object definition in help display

* sct_compute_ernst_angle: Changed class for object definition in help display

* sct_compute_hausdorff_distance: Changed class for object definition in help display

* sct_compute_mscc: Changed class for object definition in help display

* sct_compute_mtr: Changed class for object definition in help display

* sct_compute_mtsat: Changed class for object definition in help display

* sct_compute_snr: Changed class for object definition in help display

* sct_concat_transfo: Changed class for object definition in help display

* sct_convert: Changed class for object definition in help display

* sct_create_mask: Changed class for object definition in help display

* sct_crop_image: Changed class for object definition in help display

* sct_analyze_lesion: corrected module import order

* sct_analyze_texture: corrected module import order

* sct_apply_transfo: corrected module import order

* sct_compute_ernst_angle: corrected module import order

* sct_compute_hausdorff_distance: corrected module import order

* sct_compute_mscc: corrected module import order

* sct_compute_mtr: corrected module import order

* sct_concat_transfo: corrected module import order

* sct_convert: corrected module import order

* sct_create_mask: corrected module import order

* sct_crop_image: corrected module import order

* sct_analyze_lesion: changed method of verifying argument content

* sct_analyze_texture: changed method of verifying argument content

* sct_apply_transfo: changed method of verifying argument content

* sct_compute_ernst_angle: changed method of verifying argument content

* sct_compute_hausdorff_distance: changed method of verifying argument content

* sct_compute_snr: changed method of verifying argument content

* sct_concat_transfo: changed method of verifying argument content

* utils.py: Added description to class Metavar

* sct_analyze_lesion: digestion of argparse arguments now done within main

* sct_analyze_lesion: parsing of arguments now done inside main

* sct_create_mask: changed argument value initialization method

* sct_analyze_texture: moved parsing and reception of arguments into main( )

* sct_apply_transfo: moved parsing and reception of arguments into main

* sct_compute_ernst_angle: moved parsing and reception of arguments into main()

* sct_compute_mscc: moved parsing and reception of arguments into main()

* sct_compute_mtr: moved parsing and reception of arguments into main()

* sct_compute_mtsat: moved parsing and reception of arguments into main()

* sct_concat_transfo: moved parsing and reception of arguments into main()

* sct_convert: moved parsing and reception of arguments into main()

* sct_create_mask: moved parsing and reception of arguments into main()

* sct_compute_mscc: Removed calling of arguments before main

* sct_compute_mtr: corrected name of parsed arguments

* sct_convert: removed calling of arguments before main

* sct_crop_image: changed argument content verification method

* sct_crop_image: added nargs and element types for list type arguments in parser

* sct_apply_transfo.py: Added type int, removed useless if cases

Also fixed PEP8

* sct_analyze_lesion: added default value to s argument

* sct_analyze_texture.py: Fixed PEP8

* sct_analyze_texture.py: Fixed missing int in parser

* sct_analyze_lesion.py: Removed checks by setting defaults in parser

* sct_testing.py: Refactored to be compatible with new argparse (WIP)

* sct_testing.py: Made integrity testing functional, simplified paths

Now, all tests run locally and outputs are also local.

* test_sct_analyze_lesion.py: Updated to match with testing structure

* test_sct_analyze_lesion: Added output status

* test_sct_analyze_texture: Fixed testing

* sct_testing: Re-added sct_analyze_texture

* sct_testing: Re-added sct_apply_transfo.py

* test_sct_apply_transfo: Fixed

* sct_testing: re-added sct_convert

* test_sct_convert: Fixed test

* sct_testing: re-added test_sct_compute_ernst_angle

* test_sct_compute_ernst_angle: re-added, fixed PEP8

* sct_testing: re-added test_sct_compute_hausdorff_distance.py

* test_sct_compute_hausdorff_distance: adapted test

* sct_testing.py: re-added sct_compute_mtr

* test_sct_detect_pmj.py: Adapted test

* test_sct_crop_image.py: Adapted test

* sct_apply_transfo: Fixed missing input args to main()

Was breaking all non-system call functions in sct. Example in sct_dmri_moco:

        sct_apply_transfo.main(args=['-i', file_src,
                                     '-d', file_dest,
                                     '-w', file_mat + 'Warp.nii.gz',
                                     '-o', file_out_concat,
                                     '-x', param.interp,
                                     '-v', '0'])

* sct_testing: re-added a bunch of tests

* sct_analyze_lesion: Added missing args in main()

* sct_analyze_texture: Added missing args in main()

* sct_concat_transfo: re-added missing args in main()

* sct_convert: re-added missing args in main()

* sct_create_mask: re-added missing args in main()

* sct_crop_image: re-added missing args in main()

* Fixed missing default value for main(args)

* test_sct_analyze_texture: Now computing norm instead of diff

* test_sct_analyze_texture: Fixed wrong variable name

* test_sct_resample: Adapted to new testing framework

* test_sct_image: Adapted to new testing framework

* test_sct_dice_coefficient: Adapted to new testing framework

* test_sct_dmri_separate_b0_and_dwi: Adapted to new testing scheme

* test_sct_get_centerline: Adapted code to new testing scheme

* test_sct_propseg.py: Adapted to new testing scheme

* sct_label_vertebrae.py: Changed local to absolute path for template

* test_sct_analyze_texture.py: Fixed wrong sign for assertion

* test_sct_extract_metric.py: Adapted to new testing scheme

* sct_apply_transfo.py: Implemented multiple inputs for flag -w

* test_sct_apply_transfo.py: Now testing with multiple -w inputs

* utils.Metavar: Added entry: "list_files"

* utils.Metavar: Removed list_files because specifying nargs='+' already informs it's a list

* sct_apply_transfo.py: Changed the way multiple warping fields are entered

* sct_apply_transfo.py: Fixed default value for winv

* sct_register_multimodal.py: Adapted to new apply_transfo, removed sys calls

* sct_register_to_template.py: Refactored to accommodate with new apply_transfo

* test_sct_register_multimodal.py: Cosmetic changes

* sct_testing.py: re-added more functions

* test_sct_register_to_template.py: Adapted to new apply_transfo

* sct_register_multimodal.py: Passing strings (not list) to sct_apply_transfo

* sct_apply_transfo.py: Flatten nested list of input args when main is called

* sct_apply_transfo.py: Added docstring

* sct_register_to_template.py: Adapted code to sct_apply_transfo main() call

* test_sct_register_to_template.py: Adapted test to new apply_transfo scheme

* sct_testing.py: Removed sct_segment_graymatter

* test_sct_image.py: Renamed output to avoid conflicts with other functions

* sct_register_multimodal: Fixed input param for apply_transfo

* test_transfo: Fixed wrong call to apply_transfo

* sct_compute_mtsat: Fixed wrong variable name

* sct_compute_ernst_angle: Fixed usage for TR range

* sct_compute_ernst_angle: Fixed figure not showing due to MPL Agg

* sct_compute_mscc: Removed trivial examples


Former-commit-id: 3a69f834b1cdc56898e6d53feb70fa7f44ad5db7

* Improve quality of straightening (#2299)

* sct_straighten_spinalcord: Put back nurbs as option

* straightening: Put back nurbs as default algo for straightening

* test_centerline: Re-established full testing for nurbs

* centerline/core: Now using logger

* centerline/nurbs: Replaced sct.printv by logger

* centerline/nurbs: Removed FSL dependency

* centerline/nurbs: Simplified verbose

* test_centerline: Fixed test for linear fitting (was using polyfit)

* test_centerline: Removed sct.utils dependency

* centerline/core: Added algo-specific info in figures, changed default smooth=2

* centerline/curve_fitting: Added input param: degree of spline

* create_test_data: Added possibility to set pixel size

* centerline/core: Output fitting results, updated figures

* test_centerline: Testing rmse, refactored

* centerline/curve_fitting: Changed smoothing param for bspline

* sct_label_vertebrae: Removed system call

* sct_label_utils: Added new output

* process_seg: Added new output

* sct_analyze_lesion: Added new output

* sct_flatten_sagittal: Added new output

* sct_register_to_template: Added new output

* reports/slice: Added new output

* straightening: Added new output for get_centerline()

* test_centerline: Removed tests with outliers

until we implement outlier detection

* centerline/curve_fitting: Now using pz for adjusting smoothing

* centerline/core: Now using pz to adjust smoothing

* centerline/curve_fitting: Implemented smoothing for linear() (WIP)

* centerline/core: Added a few logger info

* centerline/curve_fitting: Implemented central symmetry for linear()

* centerline/curve_fitting: Output derivatives for linear()

* centerline/core: Retrieve derivative for linear()

* sct_straighten_spinalcord: Added smooth param

* straightening: Added smooth param. Set default to bspline

* centerline/curve_fitting: Adjusted s in bspline to match Hanning win_length

* centerline/core: Adjusted smoothing size, changed default to bspline

* centerline/core: Normalize NURBS derivatives, fixed Laplacian

* sct_process_segmentation: Updated comments

* centerline/cord: Updated default smooth

* straightening: Fetch default params from get_centerline

* sct_straighten_spinalcord: Fetch default params from get_centerline

* centerline/core: Minor figure improvement

* centerline/curve_fitting: Cleanup comments

* test_centerline: Added image with outlier

* sct_register_to_template: Fetching default params from get_centerline

* process_seg: Added smooth param

* sct_process_segmentation: Added smooth param

* test_process_seg: Added smooth param

* test_centerline: Changed verbose mode

* centerline/core: Introduced class ParamCenterline for code clarity

* straightening: Refactored with ParamCenterline class

* sct_straighten_spinalcord: Refactored with ParamCenterline class

* sct_process_segmentation: Refactored with ParamCenterline class

* process_seg: Refactored with ParamCenterline class

* sct_register_to_template: Refactored with ParamCenterline class

* deepseg_sc/core: Refactored with ParamCenterline class

* sct_flatten_sagittal: Refactored with ParamCenterline class

* sct_analyze_lesion: Refactored with ParamCenterline class

* sct_analyze_lesion: Cleanup

* sct_label_utils: Refactored with ParamCenterline class

* reports/slice: Refactored with ParamCenterline class

* test_centerline: Refactored with ParamCenterline class

* test_process_seg: Refactored with ParamCenterline class

* test_centerline: Fixed compatibility with new ParamCenterline() class

* centerline/core: Fixed number of outputs for optic case

* deepseg_sc/core: Fixed number of outputs for optic case

* reports/assets/index.html: Added Function+Args column

* centerline/core: Extended class FitResults to include data

for plotting in QC

* sct_process_segmentation: Added plot of centerline coordinates

* process_seg: Fixed number of outputs

* test_process_seg: Fixed number of outputs

* centerline/core: Output fit_results in vox coordinate

* compute_share: Defaulted param_centerline

* sct_process_segmentation: Cosmetic changes on QC figure

* sct_process_segmentation: Cosmetic changes on QC figure

* reports/qc: Added comments about fig size

* sct_process_segmentation: Set default parameters

see: https://github.com/neuropoly/spinalcordtoolbox/pull/2299#issuecomment-503328103

* sct_process_segmentation: Removed useless Param() class

* reports/assets/index.html: Removed duplicated Path

* sct_straighten_spinalcord: Added entry for QC

* sct_straighten_spinalcord: Fixed usage

* reports/qc: Added vertical line to straightened QC

* reports/qc: Fixed coordinate for vertical line

* reports/qc: Fixed comments

* sct_straighten_spinalcord: Set default algo for get_centerline

* centerline/core: Checking for input contrast

* sct_get_centerline: Added contrast as input param

* sct_label_vertebrae: Fixed argument issue

* sct_straighten_spinalcord: Removed polyfit

* sct_straighten_spinalcord: Removed degree from polyfit

* sct_get_centerline: Removed polyfit (not used)

* sct_process_segmentation: Removed polyfit (not used)

* sct_register_to_template: Removed polyfit (not used)

* .gitignore: Added .eggs/

Former-commit-id: 679e93b3013965fda561464639c74217686ced2a

* Create CODE_OF_CONDUCT.md

Former-commit-id: ffa504b8d525b393bda9d1ee1cf8f806f69f74a5

* README: Added installation instructions for VM

In case Docker does not work

Former-commit-id: 4e699b3fde73d998d5a90ac81a827129e1d5acb2

* Remove not suported flag -k  fromm install_sct (#2345)



Former-commit-id: a238082903a6f0a288436a0c4cdba63d2efc709d

* Refactor on install_sct (#2349)

* Remove unneeded brackets from variables on install_sct

* Add square brackets to ifs with single square brackets

* Remove unnecessary commited files

* Modify gitignore

* Add brackets to
SCT_VERSION


Former-commit-id: 60f9a5b8fa0dd7a2f739382be5ea834250cd91f4

* Remove unnecessary brackets from variables, add square brackets to if statements.


Former-commit-id: 40f39b60c84bef1f93ac7b41bcf9318cf85e4e20

* Add square brackets to if statements and remove unnecessary brackets from variables.


Former-commit-id: cd94e1682cb1163238a755d5c191e12485919f23

* Add square brackets to if statements. (#2351)



Former-commit-id: 5697e5f87b4e7d00f04a14f2f40430f4d8fa754a

* Add die function, refactor exit status, add check_requirements function


Former-commit-id: 42895722b1b28d3685ef63746b579a0ed75e83ba

* check if pip install finished correctly


Former-commit-id: 4e8b536c11bc5b623477546e3eab9319f7f695d3

* Add directories to gitignore


Former-commit-id: 30f9352dfe39161a69825fd62c351f216baeab8e

* Install numpy before other dependencies


Former-commit-id: 9e05581dd2602dc048dd5e9e9f82e871213683a9

* Check if the output is different to 0


Former-commit-id: 389d4336a65829509893ae011668302eb88a9baf

* Remove square brackets from remove qc folder section


Former-commit-id: 92907e2e5911eace2f6e4de74d6b937b43fcce1c

* Change error message for curl and wget


Former-commit-id: 1ec2ed65b711285a6159dc172db648c2829bc701

* Simplify download function, change wget and curl checks


Former-commit-id: 08f2a20522a48724ff685f4008eaace28287bad6

* Fix typo and identation


Former-commit-id: 59801eba4f77a8238133540f9e72f04481062c52

* Fix identation, removed spaces and small fixes


Former-commit-id: 9ae7c84a857f7f1670b85382b28a74333d617f3b

* Remove MPI functionality


Former-commit-id: 76003fcfcd1eedb52a0f23bcb857c64a22689f49

* Add argparse script and implement it on install_sct


Former-commit-id: 8e090a84e0540da08c7430dbcd73c819d9febdd4

* Change snake_case to kebab-case on argparse flags


Former-commit-id: f148adc3ae0f27ded89abe8902922e8a29f13725

* unit_testing/test_deepseg_lesion.py: modify the range of random numbers so that it never fails


Former-commit-id: bc9ac50419737b7d59485777c3189f1987adf793

* README.md: Update reference of Gros et al


Former-commit-id: 4c884d03a6b3f8bc6be851caba9fb535f976eca4

* Continuation conversion from msct_parser to argparse (#2337)

* sct_crop_image: Changed method of argument reception and their help description (fixes #2336)

* spinalcordtoolbox.utils: Added "flag" label to labels in Metavar class

* sct_deepseg_gm: Converted script from msct_parser to argparse

* sct_deepseg_lesion: Converted script from msct_parser to argparse

* sct_deepseg_lesion: added metavar to "-file-center", "-ofolder" and "-igt"

* sct_deepseg_sc: Converted script from msct_parser to argparse

* sct_deepseg_sc: changed args output in qc report

* sct_denoising_onlm: Converted script from msct_parser to argparse

* sct_detect_pmj: Converted script from msct_parser to argparse

* sct_dice_coefficient: Converted script from msct_parser to argparse

* sct_dmri_compute_bvalue: Converted script from msct_parser to argparse

* sct_dmri_compute_dti: Converted script from msct_parser to argparse

* sct_dmri_concat_bvals: Converted script from msct_parser to argparse

* sct_dmri_concat_bvecs: Converted script from msct_parser to argparse

* sct_concat_transfo: added -winv flag for files that should be inverted and changed -w input from str to list

* sct_deepseg_gm: Corrected method of argument reception for 'use_tta'

* sct_deepseg_lesion: Corrected method of argument reception

* sct_deepseg_sc: Corrected method of argument reception

* sct_denoising_onlm: Corrected method of argument reception

* sct_detect_pmj: Corrected method of argument reception

* sct_deepseg_lesion: Removed example from argument '-centerline'

* sct_deepseg_sc: Removed spaces when assigning arguments in function call

* sct_deepseg_sc: Removed spaces when assigning arguments in 'generate_qc' function call

* sct_denoising_onlm: Removed spaces when assigning arguments in function call

* sct_denoising_onlm: Replaced '!=' for 'is not None'

* sct_deepseg_gm: Removed spaces when assigning arguments in function call

* sct_deepseg_lesion: Removed spaces when assigning arguments in function call

* sct_deepseg_lesion: Removed spaces when assigning arguments in function call

* sct_detect_pmj: Removed spaces when assigning arguments in function call

* sct_dice_coefficient: Removed spaces when assigning arguments in function call

* sct_dmri_compute_bvalue: Removed spaces when assigning arguments in function call

* sct_dmri_compute_dti: Removed spaces when assigning arguments in function call

* sct_dmri_concat_bvals: Removed spaces when assigning arguments in function call

* sct_dmri_concat_bvecs: Removed spaces when assigning arguments in function call

* sct_deepseg_gm: Changed format for examples within parser arguments

* sct_deepseg_lesion: Changed format for examples within parser arguments

* sct_deepseg_sc: Changed format for examples within parser arguments

* sct_denoising_onlm: Changed format for examples within parser arguments

* sct_detect_pmj: Changed format for examples within parser arguments

* sct_dice_coefficient: Changed format for examples within parser arguments

* sct_dmri_compute_bvalue: Changed format for examples within parser arguments

* sct_dmri_compute_dti: Changed format for examples within parser arguments

* sct_dmri_concat_bvals: Changed format for examples within parser arguments

* sct_dmri_concat_bvecs: Changed format for examples within parser arguments

* sct_deepseg_gm: Changed metavar class of argument '-t'

* spinalcordtoolbox.utils: Removed Metavar.flag

* scripts/sct_deepseg_gm: Removed -igt (not used anymore)

* test_sct_deepseg_gm: Removed -igt

* sct_deepseg_gm: Fixed bug if -o was empty

* sct_deepseg_gm: Updated ref, cleanup

* sct_deepseg_lesion: Fixed formatting, cleanup

* deepseg_lesion/core: Removed useless imports

* sct_deepseg_lesion: Moved imports after parsing

For quicker display of help and to avoid calling the logging before running init_sct()

* sct_deepseg_sc: Moved imports after parsing

For quicker display of help and to avoid calling the logging before running init_sct()

* sct_denoising_onlm: Fixed formatting, cleanup

* sct_denoising_onlm: Removed redundant import

* sct_detect_pmj: Fixed formatting, cleanup

* sct_detect_pmj: Moved import after parsing

* sct_dice_coefficientj: Fixed formatting, cleanup

* sct_dice_coefficientj: Moved imports after parsing

* sct_dice_coefficientj: Removed useless import

* sct_dmri_compute_bvalue: Fixed formatting, cleanup

* sct_dmri_compute_bvalue: Removed useless import

* sct_dmri_concat_bvals:Fixed formatting, cleanup

* sct_dmri_concat_bvals: Moved imports after parsing

* sct_dmri_concat_bvecs: Fixed formatting, cleanup

* sct_dmri_concat_bvecs: Moved imports after parsing

* sct_dmri_compute_dti: Modified parsing parameters

* sct_dmri_compute_dti: Removed useless import

* sct_dmri_compute_dti: Moved imports after parsing

* sct_deepseg_sc: Fixed bug where manual_centerline_fname was 'NoneType'

* sct_dmri_compute_dti: Added metavar to the arguments

* test_sct_concat_transfo: Updated syntax to new parser

* sct_concat_transfo: Flatten -w and -winv

In case function is called from another Python function

* sct_register_multimodal: Fixed syntax for sct_concat_transfo

* sct_register_to_template: Reordered imports

* sct_concat_transfo: Fixed ordering of warping fields

* sct_register_to_template: Fixed syntax for sct_concat_transfo

* sct_register_to_template: Fixed missing extension

* sct_deepseg_lesion: Fixed formatting to display in 100 width

* sct_deepseg_lesion: Fixed formatting

* sct_deepseg_sc: Fixed formatting to fit in 100 width

* sct_denoising_onlm: Fixed formatting to display in 100 width

* sct_detect_pmj: Fixed formatting to display in 100 width

* sct_dice_coefficient: Fixed formatting to display in 100 width

* sct_dmri_compute_bvalue: capitalized first letter of help text for '-h' argument

* sct_dmri_compute_dti: Fixed formatting to display in 100 width

* sct_dmri_concat_bvals: Fixed formatting to display in 100 width

* sct_dmri_concat_bvecs: Fixed formatting to display in 100 width

* utils/SmartFormatter: New formatter class for argparse

Also, moved classes before definitions (PEP8)

* utils: Added reference

* sct_deepseg_sc: Using the new SmartFormatter

* sct_deepseg_gm: Using the new SmartFormatter

* sct_denoising_onlm: Using the new SmartFormatter

* sct_deepseg_lesion: Using the new SmartFormatter

* sct_detect_pmj: Using the new SmartFormatter

* sct_dice_coefficient: Using the new SmartFormatter

* sct_dmri_compute_bvalue: Using the new SmartFormatter

* sct_dmri_compute_dti: Using the new SmartFormatter

* sct_dmri_concat_bvals: Using the new SmartFormatter

* sct_dmri_concat_bvecs: Using the new SmartFormatter

* sct_concat_transfo: Using the new SmartFormatter

* sct_denoising_onlm: Fixed English

* sct_dmri_compute_dti: Removed unnecessary return carriage

* sct_dmri_concat_bvals: Input list of files now separated by space

* sct_dmri_concat_bvecs: Input files now separated by space

* sct_dmri_concat_bvecs: Updated usage

* sct_concat_transfo: SmartFormatter was forgotten

* test_sct_dmri_concat_bvals: Updated test to new input method

* test_sct_dmri_concat_bvecs: Updated test to new input method

* sct_analyze_texture: applied convention for argument display

* sct_apply_transfo: applied convention for argument display

* sct_check_dependencies: applied convention for argument display

* sct_compute_ernst_angle: applied convention for argument display

* sct_compute_hausdorff_distance: applied convention for argument display

* sct_compute_mscc: applied convention for argument display

* sct_compute_mtr: applied convention for argument display

* sct_compute_mtsat: applied convention for argument display

* sct_compute_snr: applied convention for argument display

* sct_convert: applied convention for argument display

* sct_create_mask: applied convention for argument display

* sct_crop_image: applied convention for argument display

* sct_analyze_texture: added formatter_class

* sct_compute_snr: Modified argument text

* utils: Added the possibility to custom format usage description

* sct_analyze_lesion: Using SmartFormatter

* sct_crop_image: Fixed bug introduced in parsing some fields

* scripts/sct_analyze_lesion.py: request lesion mask

* scripts/sct_analyze_lesion.py: request SC mask

* sct_crop_image: reverted supposed fix for bug

* sct_crop_image: applied back changes from commit ad02e95

* sct_crop_image: changed argument reception method for '-start', '-dim', '-end' and '-shift'


Former-commit-id: e45259aef99c2f4a9c8971dadc6155f67c63a856

* Fixed minor issues caused by the move to py3k (#2310)

* .travis.yml: Removed libopenmpi

* .travis.yml: Removed unecessary echo

* .travis.yml: Removed apt-get update (not used)


Former-commit-id: 9101db2ba8d04409abe356b2cb5fe46b8fcdd95b

* Remove unused requirement files


Former-commit-id: 0ff6d0ff80567e977aba135fed245750565a5df0

* Check if zsh is installed and add configuration.


Former-commit-id: 6449c6fa53c563a31b350b0d597f5785954a5a0e

* Rename SHELL_PATH to RC_FILE_PATH


Former-commit-id: 63ac18e6b61d1a74a86756957f28e903a697dd9a

* batch_processing.sh: QC report is now generated locally (#2370)

Fixes #2368

Former-commit-id: e2266fbbf7e969d2a54600629686c4e119120ba7

* update sct version for associated courses (#2373)

* update sct version for associated courses

* remove broken link


Former-commit-id: 8d72779db4df47c1af8c165616103d8e707b7f26

* Fixed creation of output folder and introduced new argparse class (#2374)

* utils.ActionCreateFolder: Created new argparse action class to create folder

* sct_deepseg_sc: Create output folder if does not exist

* Added utils.ActionCreateFolder() when using -ofolder


Former-commit-id: bb160afacd72041789b2b19ca39ccccd06328ffd

* Revert python argparse functionality from sct_install


Former-commit-id: d4dd32f061bc1122f1912b072307dfd5c752d062

* Install nipy with http instead of git (#2376)



Former-commit-id: d63e72b5f75f1b4d5bb47ef0bfebaaa959145767

* Argparse refactoring of scripts that break retro-compatibility (#2371)

* sct_maths: Conversion to argparse (contribution to issue #2342)

* sct_image: Conversion to argparse (contribution to issue #2342)

* sct_merge_images: Conversion to argparse (contribution to issue #2342)

* sct_straighten_spinalcord: Conversion to argparse (contribution to issue #2342)

* sct_analyze_texture: Changed method of file input within internal sct_image

* sct_image: reception of arguments before main due to sct_testing failures

* sct_image: Modified description for correct file input

* sct_analyze_texture: Removed useless indent

* sct_straighten_spinalcord: removed unnecessary whitespaces in argument definition

* sct_straighten_spinalcord: Changed argument reception conditions

* sct_image: Removed useless code

* sct_maths: Cleanup, PEP8 fix

* sct_maths: Fixed when user inputs scalar

* test_sct_maths: Made test more sensitive

* sct_testing: Sorted list of functions for clarity

* sct_straighten_spinalcord: Cleanup, used ActionCreateFolder

* sct_straighten_spinalcord: PEP8 fix

* sct_maths: Put back args as input of main()

There were remaining calls to sct_maths.main() in other functions

* sct_image: Put back input args in main()

* sct_straighten_spinalcord: Put back args as input of main()

* sct_maths: Small typo

* test_sct_image: Updated test with new CLI

* sct_straighten_spinalcord: Fixed changed of behaviour for output file name

* sct_maths: Fixed issue when getting str or float

* test_sct_maths: Made test more sensitive


Former-commit-id: 7abacb003e67d4c9f0ca3cd1b3b582dd020a9452

* batch_processing.sh: Replaced propseg by deepseg_sc (#2377)

Fixes #2356

Former-commit-id: 7087f8701dffd3ffa25f99f347a55bba131d2f34

* sct_maths: Fixed input args for -sub and -div (#2382)



Former-commit-id: 99eb720faecbd15094680829424f1e94aa3be9b9

* setup: add test option (#2379)



Former-commit-id: 72147992076752481753d43c721f8b0e66acb70a

* Fixed broken compatibility with sct_concat_transfo (#2383)

* sct_concat_transfo: Now possible to input empty list

* sct_register_multimodal: Fixed compatibility with new concat_transfo

Fixes #2381


Former-commit-id: 5d3a3cc9f91d78f08fda1092e79e98bd6eb4c51b

* Added Beijing course (#2384)

* sct_download_data: Added Beijing course

* README.md: Added link to Beijing course


Former-commit-id: eb12d2e7f47efd83f4f689161f17b13a620e7dc8

* Enabling the extraction of fMRI motion correction parameters (#2293)

* ENH: now possible to output motion correction parameters

* ENH: enable not squeezing the data when converting it

* BUG: fixed the extraction of multicomponent moco pparameters

* DOC: improved the documentation for outputted files and parameters


Former-commit-id: cbb2d1bf6c58451877b2b948285f9ef4e6f090ad

* shell/sct_run_batch.sh: Added script to run batch files (#2386)

* shell/sct_run_batch.sh: Added script to run batch files

Fixes #2329

* sct_run_batch: Now display QC open command at the end

* parameters_example.sh: Added example parameters.sh file

* install_sct: Create symlinks for shell scripts

* install_sct: sct_run_batch symlink is now without .sh

* install_sct: Fixed ln, added chmod for shell/*

* sct_download_data: Changed sct_course-beijing19 so it is removed

... if it exists

* unit_testing/test_deepseg_lesion.py: replace nan with zero


Former-commit-id: ad730ca5339a573e7bd2f73a68c64209222a51e9

* Change canvas axes for image placement.


Former-commit-id: 0bdf10c15e765048023f5eb29616c188bf1e880a

* CHANGES.md: Updated for 4.0.0 (#2392)



Former-commit-id: 8c4f63d2bbc57588654414d1b59317e22dfea389

* Added link to Chinese slides

Former-commit-id: 998f3cf4c8586ed3eca68a2046aa9afc350e921b

* README: Cosmetic change
Former-commit-id: dd0d142fe5c4ff933c20d3eac1513aa9dda3810c

* sct_image: Fixed argument reception for arguments "-keep-vol" and "-remove-vol" (fixes #2395)


Former-commit-id: 87d1b4af5c07a2d97c61e433e9d84fda0a2fe639

* sct_image: Changed double quotes for single quotes when defining with strings


Former-commit-id: 8bb320172a2485ce8815f257ee1c1f55bab3c0b4

* Fixed q/sform on transformed image (#2400)

* sct_apply_transfo: Now copying q/sform from destination image

* image.copy_qform_from_ref: New function to copy q/sform

* sct_apply_transfo: Now using image.copy_qform_from_ref()

* sct_deepseg_sc: Now copying q/sform from input to seg

Fixes #2106


Former-commit-id: 551627a62fe96e2ef9956a1d64969c9ff211c4e2

* Modify bashrc on sudo


Former-commit-id: 0105d15fa4b87f4658e746dd8280cb3907d84c54

* Corrected wrong slice information on QC output (#2408)

* sct_process_segmentation: Fixed mislabelling of x axis on graph within qc report (fixes #2391)

* sct_process_segmentation: Only shows intergers on x axis


Former-commit-id: 44153e89b5f1d4e82f054fe6f59ce2f5a3f69f38

* Fixed wrong morphometric measures with anisotropic in-plane resolution (#2396)

* resampling.resample_nipy: Param new_size is now a list

Previously it was a string

* process_seg: Axial isotropic resampling to fix wrong diameters

* deepseg_gm: Updated with recent change in resample_nipy

* reports/slice: Updated code with changes in resample_nipy

* batch_processing.sh: Now output process_seg QC report

* create_test_data: Udpated param with change in resample_nipy

* test_resampling: Fixed wrong input param for resample_nipy

* Remove unnecessary commented code, refactor if statement


Former-commit-id: 38e56f7596ece2c847f53409ca95af9904fa9cb9

* Add new line at the end of the file


Former-commit-id: b6246f776b24623831257dc4f59cca0a0a5a87c9

* Add new line at the end of the file.


Former-commit-id: 361a0a3bfc741d0f5b81662d5ba5373bcadb96ed

* Fixed -setorient-data giving wrong results (#2401)

* image: Fixes comments

* image.change_orientation: Added param data_only to not change header

* sct_image: Fixed setorient-data

Now producing correct results.

* sct_image: Do not write intermediate file

* image: PEP8 fixes


Former-commit-id: f080acec21466c6582723d3a2ad7adc53f5a8636

* README: Updated references (#2402)

* update ref

* add ref

* add year


Former-commit-id: 849cf69f624b690e2c46363723d331e9a734e88e

* Fixed flag '-evecs' not detecting input as of type int (#2417)

* sct_dmri_compute_dti: Added type to "-evecs" argument (fixes #2416)

* sct_dmri_compute_dti: Added type to "-v" argument

* sct_pipeline_makefig: Changed type of argument '-v' choices from string to int

* sct_pipeline_makefig: changed argparse formatting to new convention

* sct_pipeline_makefig: reverted changes made to convert to new parser


Former-commit-id: 3ed569ee422771cfc4c78f96d80d901fdb547fed

* Check if gcc is installed (#2410)

* Check if ggc is installed

* Remove unnecessary echo

* Small corrections on installer

* Install brew and gcc silently.

* install_sct: Removed reference to sudo (not used anymore)

* install_sct: Fixed checking gcc

* install_sct: Removed checking for git (no more needed)

* install_sct: Fixed logic

* install_sct: cosmetic fixup

* install_sct: Run brew install in sudo and add install check

* install_sct: Removed sudo installed for brew (not allowed)

* install_sct: Fixed wrong equality test in if case


Former-commit-id: 9c3c439a73c43f7c4c8b0950530a0f253b029200

* Dropped dependency to nipy (#2414)

* requirements.txt: Changed back to native nipy repos

Will need to add the fix in the SCT package instead

* sct_check_dependencies: Removed nipy fork

* parameters_example.sh: Changed mode to 755

* sct_check_dependencies: Moved main() at the end of file

* sct_check_dependencies: Replaced break by continue to stay in loop

* resampling: Replaced nipy by nibabel for resampling

* process_seg: Removed nipy dependency

* report.slice: Removed nipy dependency

* resampling: Removed nipy dependency

* create_test_data: Removed nipy dependency

* deepseg_gm: Fixed wrong nib saving

* test_resampling: Removed nipy dependency

* test_sct_deepseg_sc: Fixed wrong output name

* requirements.txt: Removed nipy

* Fixed doc

* Removed nipy dependency

* process_seg.py: Removed nipy dependency

* reports.slice: Removed nipy dependency

* resampling: Removed nipy dependency


Former-commit-id: 0e4384c23f8a3ad9dce935d040b81d707ab43847

* CHANGES.md: Updated for 4.0.1 (#2418)



Former-commit-id: ff7553098ea27d2b6a51a90965a526f53368805e

* Replaced sct.mv with shutil.copyfile for tmp space issue (#2420)

* sct_fmri_moco.py replace sct.mv with shutil.copyfile for tmp space issue

* sct_fmri_moco.py remove excess tab

* Need to import shutil


Former-commit-id: feb52ade9db59ab0318870baf1ca603701d5f339

* straightening: Fixed wrong input arguments (#2427)

Fixes #2426

Former-commit-id: 37729b0376f4394a9cb0e0dd0c075b1343fe015d

* CHANGES.md: Updated for 4.0.2 (#2428)



Former-commit-id: 9ea680c5921a9042d9390561076b962ff25283fe

* Compute cord length (#2431)

* process_seg: Implement code length

* aggregate_slicewise: Added length to output csv

* sct_process_segmentation: Added special case for computing length

* test_process_seg: Added unit testing for length

* sct_process_segmentation: Added length in documentation


Former-commit-id: 39cf66eeab8c360ec9851da09bfbcca4170ddf45

* Download data on temporary folders and remove if the folder already exist


Former-commit-id: 79145306f83157557ddb2a3fc5a13727318f4483

* Add shutil import


Former-commit-id: ef0f5e10021097c16b806134874a50553450f1ce

* scripts/sct_denoising_onlm.py: fix indexError


Former-commit-id: 0fe66f32480204815fbc64ebf5927013c18a4295

* scripts/sct_denoising_onlm.py: add fsleyes final command


Former-commit-id: c01c9ef5c966a8726a88b9d072811d784239ebfe

* scripts/sct_denoising_onlm.py: change verbose default value


Former-commit-id: e0af748e4f2a797d03afe25eb9b2c6d805b00b94

* add ref (#2434)



Former-commit-id: cdc7aa63dff62890e29160ab06769d82bc197275

* sct_download_data: Changed entry course_beijing19


Former-commit-id: 6e316ab49b8bd745d9c426f2ac3325825c9b4866

* sct_download_data: Removed print

temp folder was already displayed by the previous line of code


Former-commit-id: 0ac703d02b0caba64003f5dcf1541098639df461

* Remove isolated voxels at the edge of the output segmentation (#2437)

* sct_deepseg_sc: cosmetic

* deepseg_sc.core: Resampling Image instead of file

To minimize i/o. Also renamed some variables for clarification (unfinished)

* deepseg_sc/core: Renamed variabled according to convention

* deepseg_sc/postprocessing: New file dealing with postproc code

* deepseg_sc/postprocessing: Moved postproc code here

* deepseg_sc/core: Moved postproc code to postproc

* deepseg_sc.core: Updated input variable

* deepseg_sc.postprocessing: Implemented check for edge outliers

* deepseg_sc.postprocessing: Fixed logger format

* deep_sc/postprocessing: add post_processing_slice_wise

* deep_sc/postprocessing: logger.warning instead of logger.info

* deep_sc/core: remove i/o of im_labels when viewer

* deep_sc/core: resample im_viewer without i/o

* deep_lesion/core: resample im_viewer without i/o

* unit_testing/test_deepseg_sc.py: correct number of output for find_centerline

* deepseg_lesion: define im_viewer


Former-commit-id: cf6350f656a09118752b1cbea5e6f98f38c26da4

* Fixed wrong results while doing division (#2442)

* sct_compute_mtr: Now using true_divide

Seems to fix #2441. Further testing required.

* Moved mtsat --> qmri

* sct_compute_mtsat: Moved compute_mtsat_from_file into CLI

* qmri/mt: Replaced sct.printv with logger. PEP8 cleaning

* sct_compute_mtr: Moved computation inside qmri.mt module

* sct_compute_mtr: Cleanup

* sct_compute_mtr: Fixed missing assignment

* qmri/mt: Updated doc

* qmri/mt: Updated docstring

* test_qmri: Added unit test for qmri modules

* qmri.mt: Fixed issue with clipped values

* test_qmri: Finalized MTsat UT


Former-commit-id: a03b1e65b2934abf33abbdb8e360d38f9c937712

* Dropped support for El Capitan (#2446)

* .travis.yml: Dropped testing for El Capitan

* README: Updated support versions for OSX


Former-commit-id: 49c517c6b156bfd25606de3f5b0909ca5258d57b

* centerline/nurbs: Fixed wrong indexing (#2444)

Fixes #2443

Former-commit-id: 00a19000a5e630dfc70fec8fb151ac813bea60f7

* Fixed that appeared when copying unzipped files if destination files already exists (#2449)

* sct_download_data: Removed redundant printout

* sct_download_data: Remove files if they exists

Fixes #2448

* sct_download_data: Fixed missing output folder to check file exist


Former-commit-id: 3cba1cde442c8ac742ce90f0f19c2f010a48a072

* Fixed: removed destination file if exist did not have full path (#2450)

* sct_download_data: Removed redundant printout

* sct_download_data: Remove files if they exists

Fixes #2448

* sct_download_data: Fixed missing output folder to check file exist

* sct_download_data: Fixed wrong path for deleting dest file


Former-commit-id: bbea67ab402956a6ac42dffce64e34de96541d94

* New script to concatenate b0 and dwi data (#2452)

* sct_dmri_concat_b0_and_dwi: New script to concatenate b0 and dwi

* image: Moved concat_data() from sct_image to here

* sct_image: Moved concat_data() from here to spinalcordtoolbox.image

* sct_dmri_concat_b0_and_dwi: Finalized function

* sct_dmri_concat_b0_and_dwi: Cleanup

* sct_dmri_concat_b0_and_dwi: Clarified usage

* test_sct_dmri_concat_b0_and_dwi: Added test

* sct_dmri_concat_b0_and_dwi: Fixed syntax issue in usage

* test_sct_dmri_concat_b0_and_dwi: Fixed wrong path

* sct_testing: Added sct_dmri_concat_b0_and_dwi


Former-commit-id: acddb30d5fe5404e4c363b7e254936695c29d720

* QC report: Fixed shift along slice direction between image and overlay (#2455)

* reports/slice: Renamed function _resample_slicewise for clarity

* resampling: Replaced 'constant' to 'nearest' mode for interpolation

Fixes #2453

* image: Added TODO related to #2454


Former-commit-id: 5c27f4902faf16b848c28fa03028d3803c66a621

* Better management of CLI syntax in case mandatory arguments are missing (#2457)

* sct_deepseg_sc: Added required=true in parser

* sct_analyze_lesion: Added required=True in parser

* sct_analyze_texture: Added required=True to parser

* sct_apply_transfo: Added required=True to parser

* sct_compute_ernst_angle: Added required=True to …
jcohenadad pushed a commit that referenced this pull request Dec 18, 2019
* sct_fmri_moco.py replace sct.mv with shutil.copyfile for tmp space issue

* sct_fmri_moco.py remove excess tab

* Need to import shutil


Former-commit-id: feb52ad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug category: fixes an error in the code sct_fmri_moco context:
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sct.mv in sct_utils.py and temp space
2 participants