Skip to content

Commit

Permalink
Merge pull request #453 from jungmannlab/development
Browse files Browse the repository at this point in the history
v0.6.10
  • Loading branch information
rafalkowalewski1 authored Jun 6, 2024
2 parents 35c3d8e + 8f5199f commit e778888
Show file tree
Hide file tree
Showing 16 changed files with 615 additions and 220 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.6.9
current_version = 0.6.10
commit = True
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
Expand Down
6 changes: 5 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.10"
python:
version: 3.10
install:
- method: pip
- path: .

# Build documentation in the "docs/" directory with Sphinx
sphinx:
Expand Down
13 changes: 10 additions & 3 deletions changelog.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
Changelog
=========

Last change: 22-FEB-2024 MTS
Last change: 06-JUN-2024 MTS

0.6.9
-----
0.6.9 - 0.6.10
--------------
- Added the option to draw polygon picks in Picasso: Render
- Save pick properties in Picasso: Render saves areas of picked regions in nm^2
- Calibration .yaml file saves number of frames and step size in nm
- ``picasso.lib.merge_locs`` function can merge localizations from multiple files
- Mask dialog in Picasso: Render saves .png mask files
- Mask dialog in Picasso: Render allows to save .png with the blurred image
- Picasso: Localize - added the option to save the current view as a .png file
- Picasso: Render - functions related to picking moved to ``picasso.lib`` and ``picasso.postprocess``
- Picasso: Render - saving picked localizations saves the area(s) of the picked region(s) in the metadata file (.yaml)

0.6.6 - 0.6.8
-------------
Expand Down
4 changes: 2 additions & 2 deletions distribution/picasso.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
AppName=Picasso
AppPublisher=Jungmann Lab, Max Planck Institute of Biochemistry

AppVersion=0.6.9
AppVersion=0.6.10
DefaultDirName={commonpf}\Picasso
DefaultGroupName=Picasso
OutputBaseFilename="Picasso-Windows-64bit-0.6.9"
OutputBaseFilename="Picasso-Windows-64bit-0.6.10"
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# The short X.Y version
version = ""
# The full version, including alpha/beta/rc tags
release = "0.6.9"
release = "0.6.10"

# -- General configuration ---------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion picasso/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import os.path as _ospath
import yaml as _yaml

__version__ = "0.6.9"
__version__ = "0.6.10"

_this_file = _ospath.abspath(__file__)
_this_dir = _ospath.dirname(_this_file)
Expand Down
6 changes: 4 additions & 2 deletions picasso/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,17 @@ def _hdf2csv(path):
paths = glob(path)
if paths:
import os.path
from .io import load_locs

for path in _tqdm(paths):
base, ext = os.path.splitext(path)
if ext == ".hdf5":
print("Converting {}".format(path))
out_path = base + ".csv"
locs = pd.read_hdf(path)
locs = load_locs(path)[0]
df = pd.DataFrame(locs)
print("A total of {} rows loaded".format(len(locs)))
locs.to_csv(out_path, sep=",", encoding="utf-8")
df.to_csv(out_path, sep=",", encoding="utf-8")
print("Complete.")


Expand Down
2 changes: 1 addition & 1 deletion picasso/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION_NO = "0.6.9"
VERSION_NO = "0.6.10"
24 changes: 24 additions & 0 deletions picasso/gui/localize.py
Original file line number Diff line number Diff line change
Expand Up @@ -1145,6 +1145,10 @@ def init_menu_bar(self):
# save_parameters_action.setShortcut('Ctrl+Shift+S')
# save_parameters_action.triggered.connect(self.save_parameters)
# file_menu.addAction(save_parameters_action)
file_menu.addSeparator()
export_current_action = file_menu.addAction("Export current view")
export_current_action.setShortcut("Ctrl+E")
export_current_action.triggered.connect(self.export_current)

""" View """
view_menu = menu_bar.addMenu("View")
Expand Down Expand Up @@ -1788,6 +1792,26 @@ def save_spots_dialog(self):
if path:
self.save_spots(path)

def export_current(self):
""" Exports current view as .png or .tif. """

try:
base, ext = os.path.splitext(self.movie_path)
except AttributeError:
return
out_path = base + "_view.png"
path, ext = QtWidgets.QFileDialog.getSaveFileName(
self, "Save image", out_path, filter="*.png;;*.tif"
)
if path:
qimage = QtGui.QImage(self.view.size(), QtGui.QImage.Format_RGB32)
painter = QtGui.QPainter(qimage)
self.view.render(painter)
painter.end()
qimage.save(path)
# self.view.scene().save_image(path)
self.view.setMinimumSize(1, 1)

def save_locs(self, path):
localize_info = self.last_identification_info.copy()
localize_info["Generated by"] = "Picasso Localize"
Expand Down
Loading

0 comments on commit e778888

Please sign in to comment.