antspymm 1.3.5__py3-none-any.whl → 1.3.6__py3-none-any.whl

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.
antspymm/mm.py CHANGED
@@ -7979,14 +7979,13 @@ def mm_csv(
7979
7979
  t1wide.to_csv( hierfn + 'mmwide.csv' )
7980
7980
  ################# read the hierarchical data ###############################
7981
7981
  # over-write the rbp data with a consistent and recent approach ############
7982
- myx = antspyt1w.inspect_raw_t1( t1, hierfn + 'rbp' , option='both' )
7982
+ myx = antspyt1w.inspect_raw_t1( t1, hierfn + 'rbp' , option='both' )
7983
+ myx['brain'].to_csv( hierfn + 'rbp.csv', index=False )
7984
+ myx['brain'].to_csv( hierfn + 'rbpbrain.csv', index=False )
7983
7985
  del myx
7984
7986
  hier = antspyt1w.read_hierarchical( hierfn )
7985
- if exists( hierfn + 'mmwide.csv' ) :
7986
- t1wide = pd.read_csv( hierfn + 'mmwide.csv' )
7987
- elif not testloop:
7988
- t1wide = antspyt1w.merge_hierarchical_csvs_to_wide_format(
7989
- hier['dataframes'], identifier=None )
7987
+ t1wide = antspyt1w.merge_hierarchical_csvs_to_wide_format(
7988
+ hier['dataframes'], identifier=None )
7990
7989
  rgrade = str( t1wide['resnetGrade'].iloc[0] )
7991
7990
  if t1wide['resnetGrade'].iloc[0] < 0.20:
7992
7991
  warnings.warn('T1w quality check indicates failure: ' + rgrade + " will not process." )
@@ -8087,6 +8086,8 @@ def mm_csv(
8087
8086
  print( 'example image name is : ' )
8088
8087
  print( myimgsr )
8089
8088
  if overmodX == 'NM2DMT':
8089
+ dowrite = True
8090
+ visualize = True
8090
8091
  subjectpropath = os.path.dirname( mydoc['outprefix'] )
8091
8092
  if verbose:
8092
8093
  print("subjectpropath is")
@@ -8146,16 +8147,17 @@ def mm_csv(
8146
8147
  print(f"antspymmerror occurred while processing {overmodX}: {e}")
8147
8148
  pass
8148
8149
  if not test_run:
8149
- write_mm( output_prefix=mymm, mm=tabPro, mm_norm=normPro, t1wide=None, separator=mysep )
8150
- nmpro = tabPro['NM']
8151
- mysl = range( nmpro['NM_avg'].shape[2] )
8152
- if visualize:
8153
- mysl = range( nmpro['NM_avg'].shape[2] )
8154
- ants.plot( nmpro['NM_avg'], nmpro['t1_to_NM'], slices=mysl, axis=2, title='nm + t1', filename=mymm+mysep+"NMavg.png" )
8155
- mysl = range( nmpro['NM_avg_cropped'].shape[2] )
8156
- ants.plot( nmpro['NM_avg_cropped'], axis=2, slices=mysl, overlay_alpha=0.3, title='nm crop', filename=mymm+mysep+"NMavgcrop.png" )
8157
- ants.plot( nmpro['NM_avg_cropped'], nmpro['t1_to_NM'], axis=2, slices=mysl, overlay_alpha=0.3, title='nm crop + t1', filename=mymm+mysep+"NMavgcropt1.png" )
8158
- ants.plot( nmpro['NM_avg_cropped'], nmpro['NM_labels'], axis=2, slices=mysl, title='nm crop + labels', filename=mymm+mysep+"NMavgcroplabels.png" )
8150
+ if dowrite:
8151
+ write_mm( output_prefix=mymm, mm=tabPro,
8152
+ mm_norm=normPro, t1wide=None, separator=mysep )
8153
+ if visualize :
8154
+ nmpro = tabPro['NM']
8155
+ mysl = range( nmpro['NM_avg'].shape[2] )
8156
+ ants.plot( nmpro['NM_avg'], nmpro['t1_to_NM'], slices=mysl, axis=2, title='nm + t1', filename=mymm+mysep+"NMavg.png" )
8157
+ mysl = range( nmpro['NM_avg_cropped'].shape[2] )
8158
+ ants.plot( nmpro['NM_avg_cropped'], axis=2, slices=mysl, overlay_alpha=0.3, title='nm crop', filename=mymm+mysep+"NMavgcrop.png" )
8159
+ ants.plot( nmpro['NM_avg_cropped'], nmpro['t1_to_NM'], axis=2, slices=mysl, overlay_alpha=0.3, title='nm crop + t1', filename=mymm+mysep+"NMavgcropt1.png" )
8160
+ ants.plot( nmpro['NM_avg_cropped'], nmpro['NM_labels'], axis=2, slices=mysl, title='nm crop + labels', filename=mymm+mysep+"NMavgcroplabels.png" )
8159
8161
  else :
8160
8162
  if len( myimgsr ) > 0:
8161
8163
  dowrite=False
@@ -1,18 +1,18 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: antspymm
3
- Version: 1.3.5
3
+ Version: 1.3.6
4
4
  Summary: multi-channel/time-series medical image processing with antspyx
5
- Home-page: https://github.com/stnava/ANTsPyMM
6
- Author: Avants, Gosselin, Tustison, Reardon
7
- Author-email: stnava@gmail.com
5
+ Author-email: "Avants, Gosselin, Tustison, Reardon" <stnava@gmail.com>
8
6
  License: Apache 2.0
9
- Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
7
+ Requires-Python: >=3.8
8
+ Description-Content-Type: text/markdown
10
9
  License-File: LICENSE
11
10
  Requires-Dist: h5py >=2.10.0
12
11
  Requires-Dist: numpy >=1.19.4
13
12
  Requires-Dist: pandas >=1.0.1
14
13
  Requires-Dist: antspyx
15
- Requires-Dist: antspyt1w >=0.2.3
14
+ Requires-Dist: antspynet >=0.2.5
15
+ Requires-Dist: antspyt1w >=0.9.3
16
16
  Requires-Dist: pathlib
17
17
  Requires-Dist: dipy
18
18
  Requires-Dist: nibabel
@@ -35,7 +35,7 @@ production environments.
35
35
  install the `dev` version by calling (within the source directory):
36
36
 
37
37
  ```
38
- python setup.py install
38
+ python3 -m build .
39
39
  ```
40
40
 
41
41
  or install the latest release via
@@ -450,9 +450,12 @@ ssl._create_default_https_context = ssl._create_unverified_context
450
450
 
451
451
  ## to publish a release
452
452
 
453
+ before doing this - make sure you have a recent run of `pip-compile pyproject.toml`
454
+
453
455
  ```
454
456
  rm -r -f build/ antspymm.egg-info/ dist/
455
- python3 setup.py sdist bdist_wheel
456
- twine upload --repository antspymm dist/*
457
+ python3 -m build .
458
+ python3 -m pip install --upgrade twine
459
+ python3 -m twine upload --repository antspymm dist/*
457
460
  ```
458
461
 
@@ -0,0 +1,7 @@
1
+ antspymm/__init__.py,sha256=1fHqufHndrkJwz473av8qOf5-1xm5r-aKHuMAETGIiE,4462
2
+ antspymm/mm.py,sha256=4g15BkmRyIn-ZTB7DOT9ggTDt-Ma3be44zKpCTALikY,479806
3
+ antspymm-1.3.6.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
4
+ antspymm-1.3.6.dist-info/METADATA,sha256=CRZs-L_1fv4rQPaKsMDPK0_9SHr6BLEyieHo30fLctw,14684
5
+ antspymm-1.3.6.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
6
+ antspymm-1.3.6.dist-info/top_level.txt,sha256=iyD1sRhCKzfwKRJLq5ZUeV9xsv1cGQl8Ejp6QwXM1Zg,9
7
+ antspymm-1.3.6.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- antspymm/__init__.py,sha256=1fHqufHndrkJwz473av8qOf5-1xm5r-aKHuMAETGIiE,4462
2
- antspymm/mm.py,sha256=7UVUV4vASSwsASTT2aObJX4dg7mU28K4H85106BTuXM,479710
3
- antspymm-1.3.5.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
4
- antspymm-1.3.5.dist-info/METADATA,sha256=sJaL9YV5hUbe04k_j8YG0DhiNyyJc9CMBo-AdWDH6-M,14590
5
- antspymm-1.3.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
6
- antspymm-1.3.5.dist-info/top_level.txt,sha256=iyD1sRhCKzfwKRJLq5ZUeV9xsv1cGQl8Ejp6QwXM1Zg,9
7
- antspymm-1.3.5.dist-info/RECORD,,