-
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
0 parents
commit a3ddb5f
Showing
136 changed files
with
41,942 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
By using NiChart, the user agrees to the following license: | ||
|
||
See https://www.med.upenn.edu/cbica/software-agreement-non-commercial.html |
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,2 @@ | ||
include NiChart/plugins/loadsave/MUSE_ROI_Dictionary.csv | ||
include README.md |
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,19 @@ | ||
# This Python file uses the following encoding: utf-8 | ||
""" | ||
contact: [email protected] | ||
Copyright (c) 2018 University of Pennsylvania. All rights reserved. | ||
Use of this source code is governed by license located in license file: https://github.com/CBICA/NiChart/blob/main/LICENSE | ||
""" | ||
|
||
from PyQt5 import QtCore, QtGui, QtWidgets | ||
import os | ||
import pandas as pd | ||
from NiChart.core.dataio import DataIO | ||
from NiChart.core.model.datamodel import DataModel | ||
|
||
class NiChartCmdApp: | ||
def __init__(self): | ||
pass | ||
|
||
if __name__ == '__main__': | ||
main() |
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,47 @@ | ||
# This Python file uses the following encoding: utf-8 | ||
""" | ||
contact: [email protected] | ||
Copyright (c) 2018 University of Pennsylvania. All rights reserved. | ||
Use of this source code is governed by license located in license file: https://github.com/CBICA/NiChart/blob/main/LICENSE | ||
""" | ||
|
||
from PyQt5 import QtCore, QtGui, QtWidgets | ||
import argparse | ||
import os, sys | ||
from NiChart.mainwindow import MainWindow | ||
from NiChart.NiChartCmdApp import NiChartCmdApp | ||
|
||
def main(): | ||
parser = argparse.ArgumentParser(description='NiChart Data Visualization and Preparation') | ||
parser.add_argument('--data_file', type=str, help='Data file containing data frame.', default=None, required=False) | ||
parser.add_argument('--dict_file', type=str, help='Dict file containing data dictionary.', default=None, required=False) | ||
parser.add_argument("-nogui", action="store_true", help="Launch application in CLI mode to do data processing without any visualization or graphical user interface.") | ||
|
||
args = parser.parse_args(sys.argv[1:]) | ||
|
||
data_file = args.data_file | ||
dict_file = args.dict_file | ||
noGUI = args.nogui | ||
|
||
if(noGUI): | ||
app = QtCore.QCoreApplication(sys.argv) | ||
if(compute_spares): | ||
if((data_file == None) or (SPARE_model_file == None) or (output_file == None)): | ||
print("Please provide '--data_file', '--SPARE_model_file' and '--output_file_name' to compute spares.") | ||
exit() | ||
NiChartCmdApp().ComputeSpares(data_file, SPARE_model_file, output_file) | ||
else: | ||
app = QtWidgets.QApplication(sys.argv) | ||
|
||
# Set the style sheet | ||
with open('./style.qss', 'r') as f: ## FIXME this is absolute path to curr dir | ||
style = f.read() | ||
app.setStyleSheet(style) | ||
|
||
mw = MainWindow(dataFile = data_file, dictFile = dict_file) | ||
mw.show() | ||
|
||
sys.exit(app.exec_()) | ||
|
||
if __name__ == '__main__': | ||
main() |
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,59 @@ | ||
# This Python file uses the following encoding: utf-8 | ||
""" | ||
contact: [email protected] | ||
Copyright (c) 2018 University of Pennsylvania. All rights reserved. | ||
Use of this source code is governed by license located in license file: https://github.com/CBICA/NiChart/blob/main/LICENSE | ||
""" | ||
|
||
from PyQt5 import QtCore, QtGui, QtWidgets | ||
import argparse | ||
import os, sys | ||
from NiChart.mainwindow import MainWindow | ||
from NiChart.NiChartCmdApp import NiChartCmdApp | ||
|
||
def main(): | ||
parser = argparse.ArgumentParser(description='NiChart Data Visualization and Preparation') | ||
parser.add_argument('--data_file', type=str, help='Data file containing data frame.', default=None, required=False) | ||
parser.add_argument('--harmonization_model_file', type=str, help='Harmonization model file.', default=None, required=False) | ||
parser.add_argument('--SPARE_model_file', type=str, help='Model file for SPARE-scores.', default=None, required=False) | ||
parser.add_argument('--harmonize', type=str, help='Do harmonization or not.', default=None, required=False) | ||
parser.add_argument('--compute_spares', type=str, help='Compute SPARE-scores or not.', default=None, required=False) | ||
parser.add_argument('--output_file_name', type=str, help='Name of the output file with extension.', default=None, required=False) | ||
parser.add_argument("-nogui", action="store_true", help="Launch application in CLI mode to do data processing without any visualization or graphical user interface.") | ||
|
||
args = parser.parse_args(sys.argv[1:]) | ||
|
||
data_file = args.data_file | ||
harmonization_model_file = args.harmonization_model_file | ||
SPARE_model_file = args.SPARE_model_file | ||
harmonize = args.harmonize | ||
compute_spares = args.compute_spares | ||
output_file = args.output_file_name | ||
noGUI = args.nogui | ||
|
||
|
||
if(noGUI): | ||
app = QtCore.QCoreApplication(sys.argv) | ||
if(compute_spares): | ||
if((data_file == None) or (SPARE_model_file == None) or (output_file == None)): | ||
print("Please provide '--data_file', '--SPARE_model_file' and '--output_file_name' to compute spares.") | ||
exit() | ||
NiChartCmdApp().ComputeSpares(data_file,SPARE_model_file,output_file) | ||
else: | ||
app = QtWidgets.QApplication(sys.argv) | ||
|
||
with open('./style.qss', 'r') as f: | ||
style = f.read() | ||
# Set the current style sheet | ||
app.setStyleSheet(style) | ||
|
||
|
||
mw = MainWindow(dataFile=data_file, | ||
harmonizationModelFile=harmonization_model_file, | ||
SPAREModelFile=SPARE_model_file) | ||
mw.show() | ||
|
||
#sys.exit(app.exec_()) | ||
|
||
if __name__ == '__main__': | ||
main() |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,27 @@ | ||
# This Python file uses the following encoding: utf-8 | ||
""" | ||
contact: [email protected] | ||
Copyright (c) 2018 University of Pennsylvania. All rights reserved. | ||
Use of this source code is governed by license located in license file: https://github.com/CBICA/NiChart/blob/main/LICENSE | ||
Author: Ashish Singh | ||
""" | ||
|
||
from PyQt5 import QtCore, QtWidgets, uic | ||
import os | ||
from NiChart.resources import resources | ||
|
||
class AboutDialog(QtWidgets.QDialog): | ||
def __init__(self,parent=None): | ||
super(AboutDialog,self).__init__(parent) | ||
self.SetupUi() | ||
self.SetupConnections() | ||
|
||
def SetupConnections(self): | ||
self.buttonBox.accepted.connect(self.OnOkBtnClicked) | ||
|
||
def OnOkBtnClicked(self): | ||
self.hide() | ||
|
||
def SetupUi(self): | ||
root = os.path.dirname(__file__) | ||
self.ui = uic.loadUi(os.path.join(root, 'aboutdialog.ui'), self) |
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,127 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>Dialog</class> | ||
<widget class="QDialog" name="Dialog"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>716</width> | ||
<height>395</height> | ||
</rect> | ||
</property> | ||
<property name="minimumSize"> | ||
<size> | ||
<width>0</width> | ||
<height>0</height> | ||
</size> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>About NiChart</string> | ||
</property> | ||
<layout class="QVBoxLayout" name="verticalLayout"> | ||
<item> | ||
<layout class="QHBoxLayout" name="horizontalLayout"> | ||
<item> | ||
<widget class="QLabel" name="imagearea"> | ||
<property name="maximumSize"> | ||
<size> | ||
<width>256</width> | ||
<height>256</height> | ||
</size> | ||
</property> | ||
<property name="text"> | ||
<string/> | ||
</property> | ||
<property name="pixmap"> | ||
<pixmap>resources/NiChartLogo.png</pixmap> | ||
</property> | ||
<property name="scaledContents"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="label"> | ||
<property name="text"> | ||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> | ||
<html><head><meta name="qrichtext" content="1" /><style type="text/css"> | ||
p, li { white-space: pre-wrap; } | ||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:7.875pt; font-weight:400; font-style:normal;"> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600;">Version 0.1 </span></p> | ||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt; font-weight:600;"><br /></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">© </span><span style=" font-size:9pt;">University of Pennsylvania</span></p> | ||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;"><br /></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;">NiChart facilitates preparation of neuro-imaging data for machine learning applications.</span></p> | ||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;"><br /></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/CBICA/NiChart"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/CBICA/NiChart</span></a></p> | ||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;"><br /></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600;">License</span></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;">By using NiChart, the user agrees to the following license:</span></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://www.med.upenn.edu/cbica/software-agreement-non-commercial.html"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">https://www.med.upenn.edu/cbica/software-agreement-non-commercial.html</span></a><span style=" font-size:9pt;"> </span></p> | ||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;"><br /></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600;">Developers:</span></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;">Ahmed Abdulkadir, Ashish Singh, Randa Melhem</span></p> | ||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;"><br /></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600;">Documentation Writers:</span></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;">Ahmed Abdulkadir, Ashish Singh, Randa Melhem</span></p> | ||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt; text-decoration: underline; color:#0000ff;"><br /></p></body></html></string> | ||
</property> | ||
<property name="wordWrap"> | ||
<bool>true</bool> | ||
</property> | ||
<property name="openExternalLinks"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</item> | ||
<item> | ||
<widget class="QDialogButtonBox" name="buttonBox"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<property name="standardButtons"> | ||
<set>QDialogButtonBox::Ok</set> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
<resources/> | ||
<connections> | ||
<connection> | ||
<sender>buttonBox</sender> | ||
<signal>accepted()</signal> | ||
<receiver>Dialog</receiver> | ||
<slot>accept()</slot> | ||
<hints> | ||
<hint type="sourcelabel"> | ||
<x>248</x> | ||
<y>254</y> | ||
</hint> | ||
<hint type="destinationlabel"> | ||
<x>157</x> | ||
<y>274</y> | ||
</hint> | ||
</hints> | ||
</connection> | ||
<connection> | ||
<sender>buttonBox</sender> | ||
<signal>rejected()</signal> | ||
<receiver>Dialog</receiver> | ||
<slot>reject()</slot> | ||
<hints> | ||
<hint type="sourcelabel"> | ||
<x>316</x> | ||
<y>260</y> | ||
</hint> | ||
<hint type="destinationlabel"> | ||
<x>286</x> | ||
<y>274</y> | ||
</hint> | ||
</hints> | ||
</connection> | ||
</connections> | ||
</ui> |
Oops, something went wrong.