-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
98 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,39 @@ | ||
import os | ||
from datetime import datetime | ||
|
||
from photonai.base import PhotonRegistry | ||
from photonai.photonlogger import logger | ||
|
||
from .util import register_photonai_neuro | ||
|
||
|
||
# REGISTRATION | ||
current_path = os.path.dirname(os.path.abspath(__file__)) | ||
registered_file = os.path.join(current_path, "registered") | ||
logger.info("Checking Neuro Module Registration") | ||
if not os.path.isfile(registered_file): | ||
logger.info("Registering Neuro Module") | ||
register_photonai_neuro() | ||
with open(os.path.join(registered_file), "w") as f: | ||
f.write(str(datetime.now())) | ||
from .version import __version__ | ||
|
||
from .atlas_mapper import AtlasMapper | ||
from .brain_mask import BrainMask | ||
from .brain_atlas import BrainAtlas | ||
from .atlas_library import AtlasLibrary | ||
from .neuro_branch import NeuroBranch | ||
|
||
|
||
# REGISTRATION | ||
def do_register(current_path, registered_file): # pragma: no cover | ||
reg = PhotonRegistry() | ||
reg.add_module(os.path.join(current_path, "photonai_neuro.json")) | ||
with open(os.path.join(registered_file), "w") as f: | ||
f.write(str(__version__)) | ||
|
||
|
||
def register(): # pragma: no cover | ||
current_path = os.path.dirname(os.path.abspath(__file__)) | ||
registered_file = os.path.join(current_path, "registered") | ||
logger.info("Checking Neuro Module Registration") | ||
if not os.path.isfile(registered_file): # pragma: no cover | ||
logger.info("Registering Neuro Module") | ||
do_register(current_path=current_path, registered_file=registered_file) | ||
else: | ||
with open(os.path.join(registered_file), "r") as f: | ||
if f.read() == __version__: | ||
logger.info("Current version already registered") | ||
else: | ||
logger.info("Updating Neuro Module") | ||
do_register(current_path=current_path, registered_file=registered_file) | ||
|
||
|
||
register() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from pbr.version import VersionInfo | ||
|
||
__version__ = VersionInfo('photonai_neuro').release_string() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ pandas | |
photonai | ||
scikit-learn | ||
scikit-image | ||
pbr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[metadata] | ||
name = photonai_neuro | ||
description-file = README.md | ||
author = PHOTON Team | ||
author_email = hahnt@uni-muenster.de | ||
url = https://www.photon-ai.com/ | ||
license = GPLv3 | ||
long_description_content_type = text/markdown | ||
project_urls: | ||
Source Code = https://github.com/wwu-mmll/photonai_neuro | ||
Bug Tracker = https://github.com/wwu-mmll/photonai_neuro/issues | ||
download_url = https://pypi.org/project/photonai_neuro/#files | ||
keywords = | ||
machine learning | ||
neuroimaging | ||
MRI | ||
classifiers = | ||
License :: OSI Approved :: GNU General Public License v3 (GPLv3) | ||
Topic :: Software Development :: Libraries :: Python Modules | ||
Topic :: Scientific/Engineering :: Artificial Intelligence | ||
Intended Audience :: Science/Research | ||
|
||
[files] | ||
package = photonai_neuro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,5 @@ | ||
try: | ||
from setuptools import setup, find_packages | ||
except ImportError: | ||
from ez_setup import use_setuptools | ||
use_setuptools() | ||
from setuptools import setup, find_packages | ||
|
||
|
||
__version__ = '0.1.0' | ||
from setuptools import setup | ||
|
||
setup( | ||
name='photonai_neuro', | ||
packages=find_packages(), | ||
include_package_data=True, | ||
version=__version__, | ||
description=""" | ||
PHOTONAI NEURO | ||
The Neuro Module enables loading and preprocessing neuroimaging data such as structural and | ||
functional Magnetic Resonance Imaging (MRI) data. | ||
In addition, it supports a range of advanced feature extraction and feature engineering as well as atlas-based analyses. | ||
""", | ||
author='PHOTONAI Team', | ||
author_email='hahnt@wwu.de', | ||
url='https://github.com/mmll-wwu/photonai_neuro.git', | ||
download_url='https://github.com/wwu-mmll/photonai_neuro/archive/' + __version__ + '.tar.gz', | ||
keywords=['machine learning', 'neuroimaging', 'MRI'], | ||
classifiers=[], | ||
install_requires=[ | ||
'photonai', | ||
'nibabel', | ||
'nilearn', | ||
'scikit-image'] | ||
pbr=True | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters