antspymm 1.3.6__tar.gz → 1.3.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. {antspymm-1.3.6/antspymm.egg-info → antspymm-1.3.8}/PKG-INFO +5 -3
  2. {antspymm-1.3.6 → antspymm-1.3.8}/README.md +2 -0
  3. {antspymm-1.3.6 → antspymm-1.3.8}/antspymm/mm.py +28 -9
  4. {antspymm-1.3.6 → antspymm-1.3.8/antspymm.egg-info}/PKG-INFO +5 -3
  5. {antspymm-1.3.6 → antspymm-1.3.8}/antspymm.egg-info/SOURCES.txt +17 -20
  6. {antspymm-1.3.6 → antspymm-1.3.8}/antspymm.egg-info/requires.txt +2 -2
  7. {antspymm-1.3.6 → antspymm-1.3.8}/pyproject.toml +3 -3
  8. antspymm-1.3.8/tests/test_reference_run.py +20 -0
  9. antspymm-1.3.6/docs/release_notes.py +0 -50
  10. antspymm-1.3.6/docs/roi_visualization_limbic.py +0 -28
  11. antspymm-1.3.6/tests/test_00_setup.py +0 -7
  12. antspymm-1.3.6/tests/test_perfusion_ptbp2.py +0 -36
  13. {antspymm-1.3.6 → antspymm-1.3.8}/LICENSE +0 -0
  14. {antspymm-1.3.6 → antspymm-1.3.8}/MANIFEST.in +0 -0
  15. {antspymm-1.3.6 → antspymm-1.3.8}/antspymm/__init__.py +0 -0
  16. {antspymm-1.3.6 → antspymm-1.3.8}/antspymm.egg-info/dependency_links.txt +0 -0
  17. {antspymm-1.3.6 → antspymm-1.3.8}/antspymm.egg-info/top_level.txt +0 -0
  18. {antspymm-1.3.6 → antspymm-1.3.8}/docs/adni_rsfmri_2_nrg_conversion.py +0 -0
  19. {antspymm-1.3.6 → antspymm-1.3.8}/docs/antspymm_data_dictionary.csv +0 -0
  20. {antspymm-1.3.6 → antspymm-1.3.8}/docs/bids_cohort_example.py +0 -0
  21. {antspymm-1.3.6 → antspymm-1.3.8}/docs/blind_qc.Rmd +0 -0
  22. {antspymm-1.3.6 → antspymm-1.3.8}/docs/blind_qc.html +0 -0
  23. {antspymm-1.3.6 → antspymm-1.3.8}/docs/convert_adni_dti_to_nrg.R +0 -0
  24. {antspymm-1.3.6 → antspymm-1.3.8}/docs/deepnbm.jpg +0 -0
  25. {antspymm-1.3.6 → antspymm-1.3.8}/docs/example_antspymm_output.csv +0 -0
  26. {antspymm-1.3.6 → antspymm-1.3.8}/docs/example_run_from_directory.py +0 -0
  27. {antspymm-1.3.6 → antspymm-1.3.8}/docs/make_dict_table.Rmd +0 -0
  28. {antspymm-1.3.6 → antspymm-1.3.8}/docs/make_dict_table.html +0 -0
  29. {antspymm-1.3.6 → antspymm-1.3.8}/docs/nrg_cohort_example.py +0 -0
  30. {antspymm-1.3.6 → antspymm-1.3.8}/docs/ptbp_nrg.py +0 -0
  31. {antspymm-1.3.6 → antspymm-1.3.8}/docs/roi_visualization.py +0 -0
  32. {antspymm-1.3.6 → antspymm-1.3.8}/docs/roi_visualization_ppmi.py +0 -0
  33. {antspymm-1.3.6 → antspymm-1.3.8}/docs/step1_blind_qc.py +0 -0
  34. {antspymm-1.3.6 → antspymm-1.3.8}/docs/step2_outlierness.py +0 -0
  35. {antspymm-1.3.6 → antspymm-1.3.8}/docs/step3_mm_nrg_csv.py +0 -0
  36. {antspymm-1.3.6 → antspymm-1.3.8}/docs/step4_aggregate.py +0 -0
  37. {antspymm-1.3.6 → antspymm-1.3.8}/docs/ukbb_to_nrg_processing.py +0 -0
  38. {antspymm-1.3.6 → antspymm-1.3.8}/docs/ukbb_to_nrg_processing2.py +0 -0
  39. {antspymm-1.3.6 → antspymm-1.3.8}/setup.cfg +0 -0
  40. /antspymm-1.3.6/tests/test_bids_2_nrg.py → /antspymm-1.3.8/tests/bids_2_nrg.py +0 -0
  41. {antspymm-1.3.6 → antspymm-1.3.8}/tests/blind_qc.py +0 -0
  42. /antspymm-1.3.6/tests/test_deformation_gradient_reo.py → /antspymm-1.3.8/tests/deformation_gradient_reo.py +0 -0
  43. /antspymm-1.3.6/tests/test_dti_recon.py → /antspymm-1.3.8/tests/dti_recon.py +0 -0
  44. /antspymm-1.3.6/tests/test_dti_reg.py → /antspymm-1.3.8/tests/dti_reg.py +0 -0
  45. /antspymm-1.3.6/tests/test_dwi_rebasing.py → /antspymm-1.3.8/tests/dwi_rebasing.py +0 -0
  46. /antspymm-1.3.6/tests/test_dwi_run.py → /antspymm-1.3.8/tests/dwi_run.py +0 -0
  47. /antspymm-1.3.6/tests/test_dwi_run_ptbp_scrub.py → /antspymm-1.3.8/tests/dwi_run_ptbp_scrub.py +0 -0
  48. /antspymm-1.3.6/tests/test_flair_run.py → /antspymm-1.3.8/tests/flair_run.py +0 -0
  49. /antspymm-1.3.6/tests/test_joint_dti_recon.py → /antspymm-1.3.8/tests/joint_dti_recon.py +0 -0
  50. {antspymm-1.3.6 → antspymm-1.3.8}/tests/mm.py +0 -0
  51. /antspymm-1.3.6/tests/test_mm_csv.py → /antspymm-1.3.8/tests/mm_csv.py +0 -0
  52. {antspymm-1.3.6 → antspymm-1.3.8}/tests/mm_nrg.py +0 -0
  53. /antspymm-1.3.6/tests/test_nrg_validation.py → /antspymm-1.3.8/tests/nrg_validation.py +0 -0
  54. {antspymm-1.3.6 → antspymm-1.3.8}/tests/outlierness.py +0 -0
  55. {antspymm-1.3.6 → antspymm-1.3.8}/tests/parallel_study_aggregation_example.py +0 -0
  56. /antspymm-1.3.6/tests/test_perfusion_ptbp.py → /antspymm-1.3.8/tests/perfusion_ptbp.py +0 -0
  57. /antspymm-1.3.6/tests/test_perfusion_run.py → /antspymm-1.3.8/tests/perfusion_run.py +0 -0
  58. /antspymm-1.3.6/tests/test_rsfmri_run.py → /antspymm-1.3.8/tests/rsfmri_run.py +0 -0
  59. /antspymm-1.3.6/tests/test_rsfmri_run_minimal.py → /antspymm-1.3.8/tests/rsfmri_run_minimal.py +0 -0
  60. {antspymm-1.3.6 → antspymm-1.3.8}/tests/testsr.py +0 -0
  61. /antspymm-1.3.6/tests/test_ukbb_rsfmri.py → /antspymm-1.3.8/tests/ukbb_rsfmri.py +0 -0
  62. {antspymm-1.3.6 → antspymm-1.3.8}/tests/visualize_tractogram.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: antspymm
3
- Version: 1.3.6
3
+ Version: 1.3.8
4
4
  Summary: multi-channel/time-series medical image processing with antspyx
5
5
  Author-email: "Avants, Gosselin, Tustison, Reardon" <stnava@gmail.com>
6
6
  License: Apache 2.0
@@ -10,8 +10,8 @@ License-File: LICENSE
10
10
  Requires-Dist: h5py>=2.10.0
11
11
  Requires-Dist: numpy>=1.19.4
12
12
  Requires-Dist: pandas>=1.0.1
13
- Requires-Dist: antspyx
14
- Requires-Dist: antspynet>=0.2.5
13
+ Requires-Dist: antspyx>=0.4.2
14
+ Requires-Dist: antspynet>=0.2.8
15
15
  Requires-Dist: antspyt1w>=0.9.3
16
16
  Requires-Dist: pathlib
17
17
  Requires-Dist: dipy
@@ -22,6 +22,8 @@ Requires-Dist: scikit-learn
22
22
 
23
23
  # ANTsPyMM
24
24
 
25
+ [![CircleCI](https://dl.circleci.com/status-badge/img/gh/ANTsX/ANTsPyMM/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/ANTsX/ANTsPyMM/tree/main)
26
+
25
27
  ![mapping](https://i.imgur.com/qKqYjU9.jpeg)
26
28
 
27
29
  ## processing utilities for timeseries/multichannel images - mostly neuroimaging
@@ -1,5 +1,7 @@
1
1
  # ANTsPyMM
2
2
 
3
+ [![CircleCI](https://dl.circleci.com/status-badge/img/gh/ANTsX/ANTsPyMM/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/ANTsX/ANTsPyMM/tree/main)
4
+
3
5
  ![mapping](https://i.imgur.com/qKqYjU9.jpeg)
4
6
 
5
7
  ## processing utilities for timeseries/multichannel images - mostly neuroimaging
@@ -154,11 +154,11 @@ def version( ):
154
154
  """
155
155
  import pkg_resources
156
156
  return {
157
- 'tensorflow': pkg_resources.require("tensorflow")[0].version,
158
- 'antspyx': pkg_resources.require("antspyx")[0].version,
159
- 'antspynet': pkg_resources.require("antspynet")[0].version,
160
- 'antspyt1w': pkg_resources.require("antspyt1w")[0].version,
161
- 'antspymm': pkg_resources.require("antspymm")[0].version
157
+ 'tensorflow': pkg_resources.get_distribution("tensorflow").version,
158
+ 'antspyx': pkg_resources.get_distribution("antspyx").version,
159
+ 'antspynet': pkg_resources.get_distribution("antspynet").version,
160
+ 'antspyt1w': pkg_resources.get_distribution("antspyt1w").version,
161
+ 'antspymm': pkg_resources.get_distribution("antspymm").version
162
162
  }
163
163
 
164
164
  def nrg_filename_to_subjectvisit(s, separator='-'):
@@ -5017,8 +5017,6 @@ def neuromelanin( list_nm_images, t1, t1_head, t1lab, brain_stem_dilation=8,
5017
5017
  nmdf_wide = antspyt1w.merge_hierarchical_csvs_to_wide_format(
5018
5018
  {'NM' : nmdf},
5019
5019
  col_names = ['Mean'] )
5020
- if verbose:
5021
- print( "nm done" )
5022
5020
 
5023
5021
  rr_mask = ants.mask_image( labels2nm, labels2nm, [33,34] , binarize=True )
5024
5022
  sn_mask = ants.mask_image( labels2nm, labels2nm, [7,9,23,25] , binarize=True )
@@ -5028,7 +5026,8 @@ def neuromelanin( list_nm_images, t1, t1_head, t1lab, brain_stem_dilation=8,
5028
5026
  rravg = nm_avg_cropped[ rr_mask == 1].mean()
5029
5027
  snstd = nm_avg_cropped[ sn_mask == 1].std()
5030
5028
  rrstd = nm_avg_cropped[ rr_mask == 1].std()
5031
- snvol = np.prod( ants.get_spacing(sn_mask) ) * sn_mask.sum()
5029
+ vol_element = np.prod( ants.get_spacing(sn_mask) )
5030
+ snvol = vol_element * sn_mask.sum()
5032
5031
 
5033
5032
  # get the mean voxel position of the SN
5034
5033
  if snvol > 0:
@@ -5037,7 +5036,24 @@ def neuromelanin( list_nm_images, t1, t1_head, t1lab, brain_stem_dilation=8,
5037
5036
  else:
5038
5037
  sn_z = math.nan
5039
5038
 
5040
- nm_evr = antspyt1w.patch_eigenvalue_ratio( nm_avg, 512, [6,6,6], evdepth = 0.9, mask=cropper2nm )
5039
+ nm_evr = 0.0
5040
+ if cropper2nm.sum() > 0:
5041
+ nm_evr = antspyt1w.patch_eigenvalue_ratio( nm_avg, 512, [6,6,6],
5042
+ evdepth = 0.9, mask=cropper2nm )
5043
+
5044
+ simg = ants.smooth_image( nm_avg_cropped, np.min(ants.get_spacing(nm_avg_cropped)) )
5045
+ k = 2.0
5046
+ rrthresh = (rravg + k * rrstd)
5047
+ nmabovekthresh_mask = sn_mask * ants.threshold_image( simg, rrthresh, math.inf)
5048
+ snvolabovethresh = vol_element * nmabovekthresh_mask.sum()
5049
+ snintmeanabovethresh = ( simg * nmabovekthresh_mask ).mean()
5050
+ snintsumabovethresh = ( simg * nmabovekthresh_mask ).sum()
5051
+
5052
+ if verbose:
5053
+ print( "nm vol @2std above rrmean: " + str( snvolabovethresh ) )
5054
+ print( "nm intmean @2std above rrmean: " + str( snintmeanabovethresh ) )
5055
+ print( "nm intsum @2std above rrmean: " + str( snintsumabovethresh ) )
5056
+ print( "nm done" )
5041
5057
 
5042
5058
  return{
5043
5059
  'NM_avg' : nm_avg,
@@ -5053,6 +5069,9 @@ def neuromelanin( list_nm_images, t1, t1_head, t1lab, brain_stem_dilation=8,
5053
5069
  'NM_avg_substantianigra' : snavg,
5054
5070
  'NM_std_substantianigra' : snstd,
5055
5071
  'NM_volume_substantianigra' : snvol,
5072
+ 'NM_volume_substantianigra_above_k_thresh' : snvolabovethresh,
5073
+ 'NM_intmean_substantianigra_above_k_thresh' : snintmeanabovethresh,
5074
+ 'NM_intsum_substantianigra_above_k_thresh' : snintsumabovethresh,
5056
5075
  'NM_avg_refregion' : rravg,
5057
5076
  'NM_std_refregion' : rrstd,
5058
5077
  'NM_min' : nm_avg_cropped.min(),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: antspymm
3
- Version: 1.3.6
3
+ Version: 1.3.8
4
4
  Summary: multi-channel/time-series medical image processing with antspyx
5
5
  Author-email: "Avants, Gosselin, Tustison, Reardon" <stnava@gmail.com>
6
6
  License: Apache 2.0
@@ -10,8 +10,8 @@ License-File: LICENSE
10
10
  Requires-Dist: h5py>=2.10.0
11
11
  Requires-Dist: numpy>=1.19.4
12
12
  Requires-Dist: pandas>=1.0.1
13
- Requires-Dist: antspyx
14
- Requires-Dist: antspynet>=0.2.5
13
+ Requires-Dist: antspyx>=0.4.2
14
+ Requires-Dist: antspynet>=0.2.8
15
15
  Requires-Dist: antspyt1w>=0.9.3
16
16
  Requires-Dist: pathlib
17
17
  Requires-Dist: dipy
@@ -22,6 +22,8 @@ Requires-Dist: scikit-learn
22
22
 
23
23
  # ANTsPyMM
24
24
 
25
+ [![CircleCI](https://dl.circleci.com/status-badge/img/gh/ANTsX/ANTsPyMM/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/ANTsX/ANTsPyMM/tree/main)
26
+
25
27
  ![mapping](https://i.imgur.com/qKqYjU9.jpeg)
26
28
 
27
29
  ## processing utilities for timeseries/multichannel images - mostly neuroimaging
@@ -22,9 +22,7 @@ docs/make_dict_table.Rmd
22
22
  docs/make_dict_table.html
23
23
  docs/nrg_cohort_example.py
24
24
  docs/ptbp_nrg.py
25
- docs/release_notes.py
26
25
  docs/roi_visualization.py
27
- docs/roi_visualization_limbic.py
28
26
  docs/roi_visualization_ppmi.py
29
27
  docs/step1_blind_qc.py
30
28
  docs/step2_outlierness.py
@@ -32,28 +30,27 @@ docs/step3_mm_nrg_csv.py
32
30
  docs/step4_aggregate.py
33
31
  docs/ukbb_to_nrg_processing.py
34
32
  docs/ukbb_to_nrg_processing2.py
33
+ tests/bids_2_nrg.py
35
34
  tests/blind_qc.py
35
+ tests/deformation_gradient_reo.py
36
+ tests/dti_recon.py
37
+ tests/dti_reg.py
38
+ tests/dwi_rebasing.py
39
+ tests/dwi_run.py
40
+ tests/dwi_run_ptbp_scrub.py
41
+ tests/flair_run.py
42
+ tests/joint_dti_recon.py
36
43
  tests/mm.py
44
+ tests/mm_csv.py
37
45
  tests/mm_nrg.py
46
+ tests/nrg_validation.py
38
47
  tests/outlierness.py
39
48
  tests/parallel_study_aggregation_example.py
40
- tests/test_00_setup.py
41
- tests/test_bids_2_nrg.py
42
- tests/test_deformation_gradient_reo.py
43
- tests/test_dti_recon.py
44
- tests/test_dti_reg.py
45
- tests/test_dwi_rebasing.py
46
- tests/test_dwi_run.py
47
- tests/test_dwi_run_ptbp_scrub.py
48
- tests/test_flair_run.py
49
- tests/test_joint_dti_recon.py
50
- tests/test_mm_csv.py
51
- tests/test_nrg_validation.py
52
- tests/test_perfusion_ptbp.py
53
- tests/test_perfusion_ptbp2.py
54
- tests/test_perfusion_run.py
55
- tests/test_rsfmri_run.py
56
- tests/test_rsfmri_run_minimal.py
57
- tests/test_ukbb_rsfmri.py
49
+ tests/perfusion_ptbp.py
50
+ tests/perfusion_run.py
51
+ tests/rsfmri_run.py
52
+ tests/rsfmri_run_minimal.py
53
+ tests/test_reference_run.py
58
54
  tests/testsr.py
55
+ tests/ukbb_rsfmri.py
59
56
  tests/visualize_tractogram.py
@@ -1,8 +1,8 @@
1
1
  h5py>=2.10.0
2
2
  numpy>=1.19.4
3
3
  pandas>=1.0.1
4
- antspyx
5
- antspynet>=0.2.5
4
+ antspyx>=0.4.2
5
+ antspynet>=0.2.8
6
6
  antspyt1w>=0.9.3
7
7
  pathlib
8
8
  dipy
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "antspymm"
7
- version = "1.3.6"
7
+ version = "1.3.8"
8
8
  description = "multi-channel/time-series medical image processing with antspyx"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -17,8 +17,8 @@ dependencies = [
17
17
  "h5py>=2.10.0",
18
18
  "numpy>=1.19.4",
19
19
  "pandas>=1.0.1",
20
- "antspyx",
21
- "antspynet>=0.2.5",
20
+ "antspyx>=0.4.2",
21
+ "antspynet>=0.2.8",
22
22
  "antspyt1w>=0.9.3",
23
23
  "pathlib",
24
24
  "dipy",
@@ -0,0 +1,20 @@
1
+ import sys, os
2
+ import unittest
3
+ os.environ["TF_NUM_INTEROP_THREADS"] = "8"
4
+ os.environ["TF_NUM_INTRAOP_THREADS"] = "8"
5
+ os.environ["ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS"] = "8"
6
+ import tempfile
7
+ import shutil
8
+ import antspyt1w
9
+ import antspynet
10
+ import antspymm
11
+ import ants
12
+ import re
13
+ import pandas as pd
14
+ # just test that things loaded ok
15
+ if os.getenv('CI') == 'true' and os.getenv('CIRCLECI') == 'true':
16
+ def test_simple():
17
+ assert os.getenv('CI') == 'true' and os.getenv('CIRCLECI') == 'true'
18
+ else:
19
+ def test_simple():
20
+ assert os.getenv('CI') != 'true' and os.getenv('CIRCLECI') != 'true'
@@ -1,50 +0,0 @@
1
-
2
- import os
3
- from git import Repo
4
- from github import Github
5
-
6
- def generate_release_notes(repo_path, from_tag, to_tag, github_repo_name, github_token, release_notes_file):
7
- """
8
- Generates release notes by extracting commit messages between two tags and fetching closed issues from GitHub.
9
-
10
- Parameters:
11
- - repo_path (str): Local path to the Git repository.
12
- - from_tag (str): Tag to start collecting commits.
13
- - to_tag (str): Tag to end collecting commits.
14
- - github_repo_name (str): Full GitHub repository name (e.g., 'username/repository').
15
- - github_token (str): GitHub access token for authentication.
16
- - release_notes_file (str): File path to save the release notes.
17
- """
18
- # Extract commits
19
- repo = Repo(repo_path)
20
- commits = list(repo.iter_commits(f'{from_tag}...{to_tag}'))
21
- commit_messages = [commit.message.strip() for commit in commits]
22
-
23
- # Fetch issues from GitHub
24
- g = Github(github_token)
25
- repo = g.get_repo(github_repo_name)
26
- issues = repo.get_issues(state='closed')
27
- issue_details = [(issue.number, issue.title) for issue in issues if issue.pull_request is None]
28
-
29
- # Write to release notes file
30
- with open(release_notes_file, 'w') as file:
31
- file.write('Release Notes:\n\n')
32
- file.write('Features and Enhancements:\n')
33
- for message in commit_messages:
34
- file.write(f'- {message}\n')
35
- file.write('\nFixed Issues:\n')
36
- for issue in issue_details:
37
- file.write(f'- Issue #{issue[0]}: {issue[1]}\n')
38
-
39
- print(f"Release notes saved to {release_notes_file}")
40
-
41
- # Example usage
42
- repo_path = '/path/to/your/repo'
43
- from_tag = 'v1.0.0'
44
- to_tag = 'v1.1.0'
45
- github_repo_name = 'username/repo'
46
- github_token = 'your_github_token'
47
- release_notes_file = 'release_notes.md'
48
-
49
- generate_release_notes(repo_path, from_tag, to_tag, github_repo_name, github_token, release_notes_file)
50
-
@@ -1,28 +0,0 @@
1
- import ants
2
- import pandas as pd
3
- import numpy as np
4
- import antspymm
5
-
6
-
7
- # Example file paths and output prefix
8
- x='dtPC12'
9
- statistical_file_path="/tmp/"+x+".csv"
10
- data_dictionary_path = "~/code/ANTsPyMM/docs/antspymm_data_dictionary.csv"
11
- output_prefix = '/tmp/vizit_'+x
12
- edge_image_path = '~/.antspymm/PPMI_template0_edge.nii.gz'
13
- edge_image_path = '~/.antspymm/PPMI_template0_brain.nii.gz'
14
- brain_image = ants.image_read( edge_image_path )
15
- brain_image_t = ants.iMath( brain_image, 'TruncateIntensity', 0.002, 0.99)
16
- # Call the function
17
- zz = pd.read_csv( statistical_file_path )
18
- ocols = zz.keys()
19
-
20
- qqq = zz.copy()
21
- qqq['anat'] = qqq['anat'].str.replace(r'(vol_|thk_|LRAVG_|_LRAVG|Asym_|_Asym|volAsym|volLRAVG|thkAsym|thkLRAVG)', '', regex=True)
22
- # olimg = antspymm.brainmap_figure(qqq, data_dictionary_path, output_prefix + myco, brain_image_t, nslices=21, black_bg=False, axes=[1], fixed_overlay_range=[-1.0,1.0],verbose=True )
23
-
24
- qqq['anat'] = qqq['anat'].str.replace(r'(DTI_mean_fa_|DTI_mean_md.|DTI_mean_md_|.LRAVG.)', '', regex=True)
25
-
26
- olimg = antspymm.brainmap_figure(qqq, data_dictionary_path, output_prefix, brain_image_t, nslices=21, black_bg=True, crop=0, overlay_cmap='winter', fixed_overlay_range=[0,1.],verbose=True )
27
-
28
- ants.image_write( olimg, '/tmp/'+x+'.nii.gz' )
@@ -1,7 +0,0 @@
1
- import ants
2
- import antspyt1w
3
- import antspymm
4
- import sys
5
- antspyt1w.get_data()
6
- antspymm.get_data()
7
- sys.exit(0)
@@ -1,36 +0,0 @@
1
- import sys, os
2
- os.environ["TF_NUM_INTEROP_THREADS"] = "8"
3
- os.environ["TF_NUM_INTRAOP_THREADS"] = "8"
4
- os.environ["ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS"] = "8"
5
- import tempfile
6
- import shutil
7
- import tensorflow as tf
8
- import antspymm
9
- import antspyt1w
10
- import antspynet
11
- import ants
12
- import numpy as np
13
- from scipy.stats import median_abs_deviation
14
- import math
15
- import statsmodels.api as sm
16
- t1fn = "/Users/stnava/data/PTBP/images/PEDS049/20110217//Anatomy/PEDS049_20110217_mprage_t1.nii.gz"
17
- idpfn = "/Users/stnava/data/PTBP/images/PEDS049/20110217//PCASL/PEDS049_20110217_pcasl_1.nii.gz"
18
- if not 'dkt' in globals():
19
- t1head = ants.image_read( t1fn ).n3_bias_field_correction( 8 ).n3_bias_field_correction( 4 )
20
- t1bxt = antspynet.brain_extraction( t1head, 't1' ).threshold_image( 0.3, 1.0 )
21
- t1 = t1bxt * t1head
22
- t1seg = antspynet.deep_atropos( t1head )
23
- t1segmentation = t1seg['segmentation_image']
24
- dkt = antspynet.desikan_killiany_tourville_labeling( t1head )
25
- #################
26
- type_of_transform='Rigid'
27
- tc='alternating'
28
- fmri = ants.image_read( idpfn )
29
- print("do perf")
30
- perf = antspymm.bold_perfusion( fmri, t1head, t1,
31
- t1segmentation, dkt, robust=True, verbose=True )
32
- ##################
33
- ants.plot( perf['cbf'], axis=2, crop=True )
34
- # ants.image_write( ants.iMath( perf['perfusion'], "Normalize" ), '/tmp/temp.nii.gz' )
35
- # ants.image_write( perf['motion_corrected'], '/tmp/temp2.nii.gz' )
36
- # ants.image_write( perf['cbf'], '/tmp/temp3ptb.nii.gz' )
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes