A specialized tool for calculating proportional areas in pathology images using a hexagonal grid system.
- Hexagonal Grid System: Precisely mark and measure areas using adjustable hexagons
- Multi-layer Support: Create multiple layers to mark different tissue types or regions
- Background Image: Upload and position reference images with adjustable opacity and scale
- Area Calculation: Calculate the proportional area of each layer
- Interactive Tools:
- Adjustable hexagon size (5-40px)
- Variable brush size for efficient marking
- Eraser tool for precise corrections
- Layer visibility toggles
- Grid visibility toggle
- Editable layer names
- Node.js (v14 or later)
- pnpm (recommended) or npm
-
Clone the repository:
git clone https://github.com/htlin/areacalc.git cd areacalc -
Install dependencies:
pnpm install
-
Start the development server:
pnpm start
-
Open http://localhost:3000 in your browser
- Drawing: Click and drag on the grid to mark areas with the selected layer
- Erasing: Toggle the eraser tool and click/drag to remove marked hexagons
- Adjusting Size: Use the hexagon size controls to change grid precision
- Brush Size: Adjust brush size for faster or more precise drawing
- Adding Layers: Click the + button in the Layers panel
- Selecting Layers: Click on a layer to make it active for drawing
- Renaming Layers: Click the edit icon next to a layer name
- Toggling Visibility: Use the eye icon to show/hide layers
- Deleting Layers: Click the trash icon to remove a layer
- Uploading: Click on the Background Image panel to expand it, then select an image
- Positioning: Use the X and Y sliders to position the image
- Scaling: Adjust the scale slider to resize the image
- Opacity: Control transparency with the opacity slider
- Hide Grid: Toggle grid visibility to see only the background image
- Click the "Calculate Areas" button to compute the proportional area of each layer
- Results show the percentage and hexagon count for each layer
- Use these calculations for quantitative analysis of tissue proportions
Built with:
- React
- TypeScript
- HTML5 Canvas
- Tailwind CSS
- Lucide React icons
This project is licensed under the MIT License - see the LICENSE file for details.
Ⓒ Designed by Hsieh-Ting Lin made with ❤️
