Skip to content

Commit

Permalink
Merge pull request #243 from PhysiCell-Tools/development
Browse files Browse the repository at this point in the history
changes for PhysiCell 1.14.0
  • Loading branch information
rheiland authored Sep 16, 2024
2 parents c17ad51 + e2df4bd commit a6c48d8
Show file tree
Hide file tree
Showing 23 changed files with 2,969 additions and 1,197 deletions.
1,230 changes: 720 additions & 510 deletions bin/cell_def_tab.py

Large diffs are not rendered by default.

319 changes: 178 additions & 141 deletions bin/config_tab.py

Large diffs are not rendered by default.

26 changes: 22 additions & 4 deletions bin/filters2D.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from PyQt5 import QtCore, QtGui
from PyQt5.QtWidgets import QFrame,QApplication,QWidget,QTabWidget,QFormLayout,QLineEdit, QGroupBox, QHBoxLayout,QVBoxLayout,QRadioButton,QLabel,QCheckBox,QComboBox,QScrollArea, QMainWindow,QGridLayout, QPushButton, QFileDialog, QMessageBox, QStackedWidget, QSplitter
from studio_classes import DoubleValidatorWidgetBounded
# from PyQt5.QtWidgets import QCompleter, QSizePolicy
# from PyQt5.QtCore import QSortFilterProxyModel
# from PyQt5.QtSvg import QSvgWidget
Expand Down Expand Up @@ -130,15 +131,25 @@ def __init__(self, reset, vis_tab): # we use vis_tab for some of the methods c
glayout.addWidget(self.aspect_11_checkbox, idx_row,0,1,3) # w, row, column, rowspan, colspan

#--------------------------
self.voxel_grid_checkbox = QCheckBox_custom('voxel grid')
idx_row += 1
glayout.addWidget(QLabel("Grids:"), idx_row,0,1,2) # w, row, column, rowspan, colspan

self.voxel_grid_checkbox = QCheckBox_custom('voxel')
self.voxel_grid_checkbox.clicked.connect(self.voxel_grid_cb)
idx_row += 1
glayout.addWidget(self.voxel_grid_checkbox, idx_row,0,1,2) # w, row, column, rowspan, colspan
glayout.addWidget(self.voxel_grid_checkbox, idx_row,0,1,1) # w, row, column, rowspan, colspan

#------
self.mech_grid_checkbox = QCheckBox_custom('mech grid')
self.mech_grid_checkbox = QCheckBox_custom('mech')
self.mech_grid_checkbox.clicked.connect(self.mech_grid_cb)
glayout.addWidget(self.mech_grid_checkbox, idx_row,2,1,1) # w, row, column, rowspan, colspan
glayout.addWidget(self.mech_grid_checkbox, idx_row,1,1,1) # w, row, column, rowspan, colspan

# self.mech_grid_size = QLineEdit_custom()
self.mech_grid_size = QLineEdit("30")
self.mech_grid_size.setFixedWidth(30)
self.mech_grid_size.textChanged.connect(self.mech_grid_size_changed)
self.mech_grid_size.setValidator(DoubleValidatorWidgetBounded(bottom=1, top=999))
glayout.addWidget(self.mech_grid_size , idx_row,2, 1,1) # w, row, column, rowspan, colspan

#--------------------------
self.save_png_checkbox = QCheckBox_custom('save frame*.png')
Expand Down Expand Up @@ -247,6 +258,13 @@ def voxel_grid_cb(self):
def mech_grid_cb(self):
self.vis_tab.mech_grid_cb(self.mech_grid_checkbox.isChecked())

def mech_grid_size_changed(self,sval):
# print("size=",sval)
try:
self.vis_tab.mech_voxel_size = float(sval)
except:
pass

def save_png_cb(self):
self.vis_tab.png_frame = 0
self.vis_tab.save_png = self.save_png_checkbox.isChecked()
Expand Down
20 changes: 20 additions & 0 deletions bin/filters3D.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,19 @@ def __init__(self, reset, vis_tab): # we use vis_tab for some of the methods c
#-----------
idx_row += 1
glayout.addWidget(QHLine(), idx_row,0,1,3) # w, row, column, rowspan, colspan

idx_row += 1
self.save_png_checkbox = QCheckBox_custom('save frame*.png')
self.save_png_checkbox.clicked.connect(self.save_png_cb)
idx_row += 1
glayout.addWidget(self.save_png_checkbox, idx_row,0,1,2) # w, row, column, rowspan, colspan

idx_row += 1
self.cells_csv_button = QPushButton("Save snap.csv")
self.cells_csv_button.setStyleSheet("background-color: lightgreen;")
self.cells_csv_button.clicked.connect(self.cells_csv_cb)
glayout.addWidget(self.cells_csv_button, idx_row,0,1,2) # w, row, column, rowspan, colspan

idx_row += 1
glayout.addWidget(QLabel("Keypress j (joystick) vs. t (trackball) "), idx_row,0,1,3)
idx_row += 1
Expand Down Expand Up @@ -379,6 +392,13 @@ def sphere_res_cb(self):
# print("vis_base: sphere_res_cb(): = ",int(text))
self.vis_tab.sphere_res_cb(int(text))

def save_png_cb(self):
self.vis_tab.png_frame = 0
self.vis_tab.save_png = self.save_png_checkbox.isChecked()

def cells_csv_cb(self):
self.vis_tab.write_cells_csv_cb()

#----------
def close_filterUI_cb(self):
self.close()
Expand Down
Loading

0 comments on commit a6c48d8

Please sign in to comment.