Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions graph-digitizer-java/.github/workflows/deploy-javadocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy Maven Site (Javadocs)

on:
push:
branches: [ main, v2.0-beta ]
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'

- name: Cache Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-

- name: Build Maven site
run: mvn -B -DskipTests site

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/site
publish_branch: gh-pages
27 changes: 12 additions & 15 deletions graph-digitizer-java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,33 +54,30 @@ the `pom.xml`).
2. Navigate to the project directory
3. Build the project:

```bash
````bash
mvn clean package

```text
```

### Running the Application

Using Maven:

```bash
mvn javafx:run

```text
```

Or run the JAR directly:

```bash
java -jar target/graph_digitizer_1.0-beta.jar

```text
```

If you want to distribute a "clickable" application that does not require the
end user to install Java, see "Packaging & Distribution" below.

## Features

- **Load PNG/JPEG Images**: Load raster images of graphs for digitization
- **Load Images**: Load raster images of graphs for digitization
- **Non-blocking Calibration**: Record four clicks to establish coordinate mapping
- **Manual Point Editing**: Left-click to add points, right-click or Delete to remove
- **Precision Placement**: Zoom and magnifier tools for pixel-level accuracy (planned)
Expand Down Expand Up @@ -112,7 +109,7 @@ x,Linear,InverseLinear,zigzag,nil,Mountain,Dataset 6
1,0.13245033112582782,-0.033112582781456956,-0.033112582781456956,0,0.16556291390728478,
2,0.9602649006622516,15.132450331125828,0.8940397350993378,0.9271523178807948,1.0596026490066226,
3,1.9867549668874174,14.072847682119205,2.185430463576159,0.9271523178807948,1.0264900662251657,
```
````

JSON excerpt:

Expand Down Expand Up @@ -650,16 +647,16 @@ mvn test -Dtest=FileUtilsTest
The application manages three related coordinate systems and clarifies how they interact:

1. **Image Pixel Coordinates**: The image's natural pixel coordinate space (0..width-1, 0..height-1). The
{@link com.digitizer.core.CoordinateTransformer} maps between numeric data values and these image pixel
coordinates (this is the coordinate space used by the tracer and by the calibration anchors stored in
{@link com.digitizer.core.CalibrationState}).
{@link com.digitizer.core.CoordinateTransformer} maps between numeric data values and these image pixel
coordinates (this is the coordinate space used by the tracer and by the calibration anchors stored in
{@link com.digitizer.core.CalibrationState}).

2. **Canvas Coordinates**: Pixel positions in the JavaFX Canvas where the image is rendered. The canvas may
render the image at a scaled size (`displayScale`) and with offsets (`offsetX`, `offsetY`) so UI drawing
(snap lines, points, ticks) must convert image-pixel coordinates into canvas coordinates before drawing.
render the image at a scaled size (`displayScale`) and with offsets (`offsetX`, `offsetY`) so UI drawing
(snap lines, points, ticks) must convert image-pixel coordinates into canvas coordinates before drawing.

3. **Data Coordinates**: Actual numeric values from the graph axes (e.g., 0.0..100.0). The transformer supports
linear and logarithmic mappings between data coordinates and image pixels.
linear and logarithmic mappings between data coordinates and image pixels.

Note: Because the UI supports zooming (which changes `displayScale`) and fitting, the conversion helpers
in the UI layer perform image<->canvas conversions. This ensures points and tick marks remain visually in the
Expand Down
9 changes: 9 additions & 0 deletions graph-digitizer-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -481,4 +481,13 @@
</build>
</profile>
</profiles>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.5.0</version>
</plugin>
</plugins>
</reporting>
</project>