-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
214 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
# Contribution Guidelines | ||
|
||
We welcome contributions to **Larvitar**! Whether you're reporting a bug, suggesting a feature, improving documentation, or contributing code, your help is greatly appreciated. | ||
|
||
Please take a moment to review these guidelines to make the contribution process smooth and effective for everyone. | ||
|
||
--- | ||
|
||
## 🛠 How to Contribute | ||
|
||
### 1. Fork the Repository | ||
1. Click the **Fork** button at the top right of this repository. | ||
2. Clone your fork to your local machine: | ||
```bash | ||
git clone https://github.com/your-username/Larvitar.git | ||
cd Larvitar | ||
``` | ||
|
||
### 2. Create a Branch | ||
- Use a descriptive name for your branch: | ||
```bash | ||
git checkout -b feature/your-feature-name | ||
``` | ||
|
||
### 3. Make Your Changes | ||
- Add or modify code or documentation as needed. | ||
- Follow the existing code style and structure. | ||
|
||
### 4. Test Your Changes | ||
- Ensure your changes don't break existing functionality. | ||
- Run the development server: | ||
```bash | ||
yarn run dev | ||
``` | ||
- Verify everything works as expected. | ||
|
||
### 5. Commit Your Changes | ||
- Write clear and concise commit messages: | ||
```bash | ||
git add . | ||
git commit -m "Add feature X to Y" | ||
``` | ||
|
||
### 6. Push Your Changes | ||
- Push your changes to your fork: | ||
```bash | ||
git push origin feature/your-feature-name | ||
``` | ||
|
||
### 7. Open a Pull Request | ||
1. Go to the **Pull Requests** tab in this repository. | ||
2. Click **New Pull Request**. | ||
3. Select your branch and provide a detailed description of your changes. | ||
|
||
--- | ||
|
||
## 📋 Code of Conduct | ||
|
||
By contributing to this project, you agree to abide by our [Code of Conduct](CODE_OF_CONDUCT.md). | ||
|
||
--- | ||
|
||
## 🧪 Development Workflow | ||
|
||
### Install Dependencies | ||
Run the following command to install all required dependencies: | ||
```bash | ||
yarn install | ||
``` | ||
|
||
### Start Development Server | ||
Start the development server to preview changes: | ||
```bash | ||
yarn run dev | ||
``` | ||
|
||
### Build for Production | ||
To build the project for production: | ||
```bash | ||
yarn run build | ||
``` | ||
|
||
--- | ||
|
||
## 📝 Reporting Issues | ||
|
||
1. Search the existing issues to avoid duplicates. | ||
2. Open a new issue and provide: | ||
- A clear and concise title. | ||
- A detailed description of the issue. | ||
- Steps to reproduce the problem, if applicable. | ||
|
||
--- | ||
|
||
## 📚 Submitting Documentation | ||
|
||
1. Update or improve the documentation located in the `/docs` folder. | ||
2. Follow the same steps to create a pull request. | ||
|
||
--- | ||
|
||
## 🔄 Branch Naming Convention | ||
|
||
Use the following branch naming conventions for clarity: | ||
- **Features**: `feature/your-feature-name` | ||
- **Bugfixes**: `fix/bug-description` | ||
- **Documentation**: `docs/update-section-name` | ||
|
||
--- | ||
|
||
## ✅ Pull Request Checklist | ||
|
||
Before submitting a pull request: | ||
1. Ensure your code is clean and follows the existing style. | ||
2. Include comments to explain complex logic, if applicable. | ||
3. Add or update tests for new functionality. | ||
|
||
--- | ||
|
||
## 🙌 Thank You | ||
|
||
Thank you for taking the time to contribute to **Larvitar**. Your efforts make this project better for everyone! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,129 +1,99 @@ | ||
<p align="center"> | ||
<img src="https://assets.pokemon.com/assets/cms2/img/pokedex/full/246.png" width="100" title="hover text" alt="accessibility text"> | ||
<img src="https://assets.pokemon.com/assets/cms2/img/pokedex/full/246.png" width="100" title="Larvitar Logo" alt="Larvitar Logo"> | ||
</p> | ||
|
||
# Larvitar | ||
|
||
![License](https://img.shields.io/github/license/dvisionlab/Larvitar) | ||
[![type-coverage](https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Fplantain-00%2Ftype-coverage%2Fmaster%2Fpackage.json)](https://github.com/dvisionlab/Larvitar) | ||
![Last Commit](https://img.shields.io/github/last-commit/dvisionlab/Larvitar) | ||
![GitHub stars](https://img.shields.io/github/stars/dvisionlab/Larvitar?style=social) | ||
|
||
|
||
**Larvitar** is a modern, lightweight TypeScript library for medical imaging applications. Built on top of the Cornerstone ecosystem, Larvitar provides tools for rendering, analyzing, and interacting with medical images, including support for advanced modalities like multiframe images, NRRD, and ECG synchronization. | ||
|
||
## 🛠 Current Version | ||
|
||
![Build Status](https://img.shields.io/github/actions/workflow/status/dvisionlab/Larvitar/build-docs.yml?branch=master) | ||
[![GitHub release](https://img.shields.io/github/v/release/dvisionlab/Larvitar?color=green)](https://github.com/dvisionlab/Larvitar/releases/latest) | ||
![npm](https://img.shields.io/npm/v/larvitar) | ||
|
||
Check out the [releases page](https://github.com/dvisionlab/Larvitar/releases) for more details. | ||
|
||
## 🚀 Features | ||
|
||
- **Advanced DICOM Image Rendering**: Seamlessly handles single-frame, multiframe, and custom modalities. | ||
- **ECG and Waveform Visualization**: Built-in tools for synchronizing and rendering waveforms. | ||
- **Custom Tools and Extensions**: Easily extendable for specific imaging needs. | ||
- **Integration Ready**: Designed for use in advanced imaging workflows and applications. | ||
|
||
--- | ||
|
||
## 📖 Documentation | ||
|
||
Comprehensive documentation is available on the [Larvitar Documentation Page](https://larvitar.dvisionlab.com). | ||
|
||
### Sections | ||
1. [**Core API**](https://larvitar.dvisionlab.com/api/): Learn how to parse, load, and render DICOM images. | ||
2. [**Modules**](https://larvitar.dvisionlab.com/api/): Explore the segmentation tools, color maps, and advanced rendering features. | ||
3. [**Examples**](https://larvitar.dvisionlab.com/guide/examples.html): See working examples for ECG synchronization, NRRD image loading, segmentation tools, and more. | ||
4. [**Installation**](https://larvitar.dvisionlab.com/guide/installation.html): Step-by-step guide to getting started with Larvitar in your project. | ||
|
||
--- | ||
|
||
## 📦 Dependencies | ||
|
||
Larvitar relies on the following libraries for its core functionality: | ||
|
||
- [`cornerstone-core`](https://github.com/cornerstonejs/cornerstone): Core library for medical image visualization. | ||
- [`cornerstone-tools`](https://github.com/cornerstonejs/cornerstoneTools): A suite of tools for image interaction. | ||
- [`cornerstone-wado-image-loader`](https://github.com/cornerstonejs/cornerstoneWADOImageLoader): Loader for WADO-based DICOM images. | ||
- [`dicom-parser`](https://github.com/cornerstonejs/dicomParser): Parser for DICOM files. | ||
- [`cornerstone-file-image-loader`](https://github.com/webnamics/cornerstoneFileImageLoader): Loader for file-based DICOM images. | ||
|
||
Make sure to have these dependencies installed when developing or using Larvitar. | ||
|
||
--- | ||
|
||
## 🛠 Development | ||
|
||
To start developing Larvitar or contribute to the project: | ||
|
||
1. **Clone the repository**: | ||
```bash | ||
git clone https://github.com/dvisionlab/Larvitar.git | ||
cd Larvitar | ||
``` | ||
2. **Install dependencies**: | ||
```bash | ||
yarn install | ||
``` | ||
3. **Start the development server**: | ||
```bash | ||
yarn run dev | ||
``` | ||
4. **Open the development environment**: | ||
- Serve the examples folder using a static server (e.g., `http-server` or visual studio code live server). | ||
- Navigate to http://localhost:5500/docs/examples/<example_name>.html (or the port configured in your dev server). | ||
|
||
## 📝 License | ||
Larvitar is licensed under the MIT License. Feel free to use, modify, and distribute it in your projects. | ||
|
||
## 🤝 Contributing | ||
|
||
Contributions are welcome! If you’d like to report a bug, suggest a feature, or submit a pull request, please follow our [contributing guidelines](CONTRIBUTING.md). | ||
|
||
Larvitar has adopted a [Code of Conduct](CODE_OF_CONDUCT.md) that we expect project participants to adhere to. | ||
|
||
## 👨💻 Main Developers | ||
|
||
- Simone Manini, D/Vision Lab | [LinkedIn](https://linkedin.com/in/simone-manini) | ||
- Mattia Ronzoni, D/Vision Lab | [LinkedIn](https://linkedin.com/in/mattiaronzoni90) | ||
- Laura Borghesi, D/Vision Lab | [LinkedIn](https://linkedin.com/in/laura-borghesi-160557218) | ||
- Sara Zanchi, D/Vision Lab | [LinkedIn](https://linkedin.com/in/sara-zanchi-113a4b61) | ||
|
||
|
||
<p align="center"> | ||
<img src="https://press.r1-it.storage.cloud.it/logo_trasparent.png" width="200" title="D/Vision Lab Logo" alt="D/Vision Lab Logo"> | ||
</p> | ||
|
||
## Dicom Image Toolkit for CornerstoneJS | ||
|
||
### Current version: 3.0.0-beta.2 | ||
|
||
### Latest Published Release: 2.7.3 | ||
|
||
This library provides common DICOM functionalities to be used in web-applications: it's wrapper that simplifies the use of cornerstone-js environment. | ||
|
||
## Features: | ||
|
||
- Orthogonal multiplanar reformat with contours generations | ||
- Custom loader/exporter for nrrd files | ||
- Segmentation masks support | ||
- Memory management | ||
- Support all dicom modalities | ||
- 4D Cine support | ||
- Anonymization functionalities | ||
- Cine tools and ECG Parsing | ||
- Masks management | ||
|
||
Full documentation and examples are available at http://www.dvisionlab.com/Larvitar/. | ||
|
||
# Typescript | ||
|
||
_Types_ can be imported from `larvitar/imaging/types` or `larvitar/imaging/tools/types`. | ||
|
||
```javascript | ||
import { Series } from "larvitar/imaging/types"; | ||
|
||
let newSerie: Series; | ||
``` | ||
|
||
<br> | ||
|
||
# Dependencies | ||
|
||
- `cornerstone` | ||
- `cornerstone-tools` | ||
- `dicomParser` | ||
- `DICOMImageLoader` | ||
- `webImageLoader` | ||
- `fileImageLoader` | ||
- `lodash` | ||
- `pako` | ||
- `papaparse` | ||
|
||
# Installation | ||
|
||
`yarn add larvitar` | ||
|
||
# Build package | ||
|
||
`yarn build` | ||
|
||
# Coverage | ||
|
||
Use `yarn coverage` to generate type coverage report. | ||
|
||
# Development | ||
|
||
Use `yarn dev` to have `webpack` hot-reload (live recompiling the library). | ||
In order to test functionalities you can serve the .html file with VSCode extension [LiveServer](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) or other similar tools. | ||
Once you are done, upgrade the version (README and package.json) and build the library. Docs will be compiled by the Github action. | ||
|
||
### Repository structure | ||
|
||
- `index` main file | ||
- `dataDictionary` json file for dicom tags | ||
- `imageAnonymization` provides anonymization functionalities | ||
- `imageCustomization` provides Byte Array customization functionalities | ||
- `imageColormaps` provides color maps functionalities | ||
- `imageContours` using to populate cornerstone tool for segmentation contours on 2D images | ||
- `imageIo` import a dicom image in .nrrd format and build contiguous array for exporting data as volume | ||
- `imageLayers` provide support for multi-layer cornerstone fusion renderer | ||
- `imageLoading` initialize loader and custom loaders | ||
- `imageParsing` parse dicom files and return a cornerstone data structure ready to be used for rendering | ||
- `imagePresets` provides default image CT presets and set functionality | ||
- `imageRendering` provides rendering functionalities | ||
- `imageReslice` provides reslice functionalities | ||
- `imageStore` provides data storage functionalities, vuex support is integrated | ||
- `imageTags` using to handle dicom tags and metadata | ||
- `imageTools` using to handle standard and custom cornerstone tools | ||
- `imageUtils` utility functions on pixels and metadata tags | ||
- `loaders/commonLoader` common functionalities for custom loaders | ||
- `loaders/dicomLoader` custom loader for DICOM files with support for multiplanar reformat (axial, sagittal and coronal planes) | ||
- `loaders/fileLoader` custom loader for png/jpg files | ||
- `loaders/multiFrameLoader` custom loader for multiFrame data | ||
- `loaders/nrrdLoader`custom loader for nrrd files with support for multiplanar reformat (axial, sagittal and coronal planes) | ||
- `loaders/resliceLoader` custom loader for resliced data | ||
- `parsers/ecg` custom parser for ecg data | ||
- `parsers/nrrd` custom parser for nrrd data | ||
- `tools/custom/4DSliceScrollTool` is a custom cornerstone tool for handling navigation of slices in a 4D DICOM series | ||
- `tools/custom/contourTool` is a custom cornerstone tool for 2D visualization of segmented images | ||
- `tools/custom/diameterTool` is a custom cornerstone tool for 2D visualization of diameter widgets | ||
- `tools/custom/editMaskTool` is a custom cornerstone tool for 2D visualization of segmentation masks with brush functionalities | ||
- `tools/custom/EllipticalRoiOverlayTool` is a custom cornerstone tool for 2D visualization of elliptical widgets | ||
- `tools/custom/polygonSegmentationMixin` is a custom cornerstone tool for 2D visualization of polygonal widgets | ||
- `tools/custom/polylineScissorTool` is a custom cornerstone tool for 2D visualization of polyline widgets | ||
- `tools/custom/rectangleRoiOverlayTool` is a custom cornerstone tool for 2D visualization of rectangular widgets | ||
- `tools/custom/seedTool` is a custom cornerstone tool for 2D interactive seeding with custom colors and labels | ||
- `tools/custom/setLabelMap3D` | ||
- `tools/custom/thresholdsBrushTool` is a custom cornerstone tool for handling thresholds in a brush tool | ||
- `tools/default` default tools map and configuration | ||
- `tools/interaction` cornerstone interaction tools | ||
- `tools/io` import and export functionalities for tools | ||
- `tools/main` tools main functionalities | ||
- `tools/state` tools state management | ||
- `tools/segmentation` segmentation masks management | ||
- `tools/strategies/eraseFreeHand` strategy for erasing freehand masks | ||
- `tools/strategies/fillFreeHand` strategy for filling freehand masks | ||
- `tools/strategies/index` strategies index | ||
|
||
# Contributors | ||
|
||
- Simone Manini, D/Vision Lab | ||
- Mattia Ronzoni, D/Vision Lab | ||
- Sara Zanchi, D/Vision Lab | ||
- Alessandro Re, D/Vision Lab | ||
- Laura Borghesi, D/Vision Lab | ||
|
||
![dvisionlab logo](https://press.r1-it.storage.cloud.it/logo_trasparent.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.