Metadata-Version: 2.4
Name: datview
Version: 2.0.0
Summary: GUI software for viewing images, text, cine, and HDF files.
Home-page: https://github.com/algotom/datview
Download-URL: https://github.com/algotom/datview.git
Author: Nghia Vo
Author-email: nvo@bnl.gov
License: Apache 2.0
Keywords: HDF Viewer,CINE viewer,NXS Viewer,Image viewer,Data viewer,TEXT viewer
Platform: Any
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Natural Language :: English
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: h5py
Requires-Dist: hdf5plugin
Requires-Dist: pillow
Requires-Dist: PySide6
Requires-Dist: pyqtgraph
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: download-url
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: platform
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# DatView
### (Dat)a (View)er software 
![Datview_Logo](https://github.com/algotom/datview/raw/main/icon.png)

---

*Python GUI software for folder browsing and viewing text, image, Cine, and HDF files*

---


Motivation
==========

For synchrotron-based tomography, users need convenient tools to view their 
data, typically in TIF, HDF, or CINE format during experiments, along with 
basic assessment tools such as contrast adjustment, zooming, line-profile 
viewing, histograms, image statistics, or percentile density. However, at synchrotron facilities, 
where Linux OS and open-source software are the primary tools, users often need to switch 
between multiple GUI applications for these tasks such as Nautilus for folder browsing, 
NeXpy or HDFView for HDF files, Gedit for text files, and ImageJ for image viewing.

This separation of tools is inconvenient, especially since many users are not familiar 
with the Linux OS. **DatView** provides a unified GUI for all these tasks, improving 
efficiency and user experience. **DatView** runs across operating systems.

Design Philosophy
=================

DatView has been developed following two key guidelines:
-   Minimize dependencies and the codebase.
-   Maximize functionality and maintainability.

For distributing the software through Pip and Conda, the software is structured 
based on the RUI (Rendering-Utilities-Interactions) concept, which is a user-friendly 
adaptation of the MVC design pattern.

For the easiest usage, a monolithic codebase (**datview.py**) is provided, 
allowing users to simply copy the file and run it without needing to install 
the software through Pip or Conda, provided that their Python environment 
includes libraries in the requirements.txt.

Starting from version 2.0, PySide6 and pyqtgraph are used instead of Tkinter 
and Matplotlib to improve responsiveness and performance.

Features
========
-   Fast folder browsing and file listing.

    ![Fig1](https://github.com/algotom/datview/raw/main/figs/fig1.png)
  
-   Interactive viewing 1D, 2D, or 3D datasets in an HDF file. Supports ROI zooming, 
    horizontal/vertical line-profile selection, contrast adjustment, and slicing along axis 0 and 1. 

    ![Fig2](https://github.com/algotom/datview/raw/main/figs/fig2.png)

-   Options to display histogram, percentile density, image statistics.

    ![Fig3](https://github.com/algotom/datview/raw/main/figs/fig3.png)

-   View metadata in HDF or CINE files, and display text-file contents.

    ![Fig4](https://github.com/algotom/datview/raw/main/figs/fig4.png)

-   Export to TIF files from HDF or CINE files.

    ![Fig5](https://github.com/algotom/datview/raw/main/figs/fig5.png)

-   Interactive viewing of TIF files in a folder or frames of a CINE file.

-   Interactive viewing of common image formats (JPG, PNG, TIF, ...).
-   Viewing 1D or 2D datasets of an HDF file in table format.
-   Opening multiple interactive viewers simultaneously.
-   Saving a 2D array in a 3D dataset (HDF or CINE) as an image.
-   Saving the current line profile as a CSV file.

Installation
============

Install [Miniconda, Anaconda or Miniforge](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html), then 
open a Linux terminal or the Miniconda/Anaconda PowerShell prompt and use the following commands
for installation.

Using pip:
```commandline
pip install datview
```
Using conda:
```commandline
conda install -c conda-forge datview
```
Once installed, launching Datview with
```commandline
datview
```
Using -h for option usage
```commandline
datview -h
```
---
Installing from source:
- If using a single file:
    + Copy the file *datview.py*. Install python, h5py, pillow, and matplotlib
    + Run:
        ```commandline
        python datview.py
        ```
- If using setup.py
    + Create conda environment
      ```commandline
      conda create -n datview python=3.11
      conda activate datview
      ``` 
    + Clone the source (git needs to be installed)
      ```commandline
      git clone https://github.com/algotom/datview.git
      ```
    + Navigate to the cloned directory (having setup.py file)
      ```commandline
      pip install .
      ```

Generating the executable application

- Install the required Python packages in your environment: PyInstaller, H5py,
  Hdf5plugin, Pillow, Matplotlib

- Use the **build_exe_app.py** script and run the following command:
  ```commandline
  python build_exe_app.py
