# dicomcrop
dicomcrop is a project used for cropping digital images. It allows for users to select a rectangular area of the image and crop it out, allowing them to resize and adjust the image as needed.
The project has the following features:
- Selecting an area of an image to crop
- Adjusting the size of the cropped area
- Resizing the cropped image
- Saving the cropped image in various formats
Prepare bedside medical images for machine learning and image interpretation. dicomcropper isolates the dynamic component of an image and strips away the rest.
## Installation
Requires python 3.7 or higher
Install with pip: ```pip3 install dicomcrop --upgrade```
#### crop
Automatically crop away static borders as much as you need
```bash
dicomcrop --dir <dir>
```
Automatically crop away static borders in a single file
```bash
dicomcrop --image <image>
```
Generates cropped images encrypting private informations
```bash
dicomcrop --dir <dir> --encrypted
```
It's possible to disable the encrypted feature
```bash
dicomcrop --dir <dir> --encrypted=False
```
There is an easter egg to fetch informations from a spreadsheet file:
```bash
dicomcrop --dir <dir> --encrypted --egg=True
```
*all these extra commands can be applied following the `--image` command*
#### edges
Extracts the edges around an medical image
Returns the distance in pixels in the form:
left,right,top,bottom
```shell
dicomcrop --edges example.DCM
> (293, 17, 969, 696)
```
#### secrets
Returns a secret string from the library:
```shell
dicomcrop --secret
> e06dda30-5312-4623-936e-20b669c10495
```
#### tokens
Generate a hash string:
```shell
dicomcrop --token
> e06dda30-5312-4623-936e-20b669c10495
```
Generate a encrypted hash scring:
```shell
dicomcrop --token --encrypted
> eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXRpZW50X2lkIjoiZDQxMmY4MmUtY2U5Ni00MTg4LWEwZTktNWFmMTIzYTlkMDZlIn0._xhyeXCoaboKH8rqvzKCWa6Zg7ne9bjSHn58c91aLCc
```
#### summary
Command | Input | Output
------- | ----- | ------
crop | ![Input](./examples/sample.jpg) | ![Out](./examples/output.jpg)
Raw data
{
"_id": null,
"home_page": "https://github.com/falcucci/dicomcrop",
"name": "dicomcrop",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "dicom bedside pocus ffmpeg opencv echo cardiac cancer hospital",
"author": "Alexsander Falcucci",
"author_email": "alex.falcucci@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/38/78/bd81a3c31940ee8490867f06f0d02058c895d788db3247e40d08f15ae2e8/dicomcrop-0.6.tar.gz",
"platform": null,
"description": "# dicomcrop\n\ndicomcrop is a project used for cropping digital images. It allows for users to select a rectangular area of the image and crop it out, allowing them to resize and adjust the image as needed.\n\nThe project has the following features:\n\n- Selecting an area of an image to crop\n- Adjusting the size of the cropped area\n- Resizing the cropped image\n- Saving the cropped image in various formats\n\nPrepare bedside medical images for machine learning and image interpretation. dicomcropper isolates the dynamic component of an image and strips away the rest.\n\n## Installation\n\nRequires python 3.7 or higher\n\nInstall with pip: ```pip3 install dicomcrop --upgrade```\n\n\n#### crop\n\nAutomatically crop away static borders as much as you need\n```bash\ndicomcrop --dir <dir>\n```\n\nAutomatically crop away static borders in a single file\n```bash\ndicomcrop --image <image>\n```\n\nGenerates cropped images encrypting private informations\n```bash\ndicomcrop --dir <dir> --encrypted\n```\n\nIt's possible to disable the encrypted feature\n\n```bash\ndicomcrop --dir <dir> --encrypted=False\n```\n\nThere is an easter egg to fetch informations from a spreadsheet file:\n\n```bash\ndicomcrop --dir <dir> --encrypted --egg=True\n```\n\n*all these extra commands can be applied following the `--image` command*\n\n#### edges\n\nExtracts the edges around an medical image\n\nReturns the distance in pixels in the form:\nleft,right,top,bottom\n\n```shell\ndicomcrop --edges example.DCM\n> (293, 17, 969, 696)\n```\n\n#### secrets\n\nReturns a secret string from the library:\n\n```shell\ndicomcrop --secret\n> e06dda30-5312-4623-936e-20b669c10495\n```\n\n#### tokens\n\nGenerate a hash string:\n\n```shell\ndicomcrop --token\n> e06dda30-5312-4623-936e-20b669c10495\n```\n\nGenerate a encrypted hash scring:\n\n```shell\ndicomcrop --token --encrypted\n> eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXRpZW50X2lkIjoiZDQxMmY4MmUtY2U5Ni00MTg4LWEwZTktNWFmMTIzYTlkMDZlIn0._xhyeXCoaboKH8rqvzKCWa6Zg7ne9bjSHn58c91aLCc\n```\n\n#### summary\n\nCommand | Input | Output\n------- | ----- | ------\ncrop | ![Input](./examples/sample.jpg) | ![Out](./examples/output.jpg)\n",
"bugtrack_url": null,
"license": "Apache Software License 2.0",
"summary": "Prepare bedside medical images for machine learning and image interpretation.",
"version": "0.6",
"split_keywords": [
"dicom",
"bedside",
"pocus",
"ffmpeg",
"opencv",
"echo",
"cardiac",
"cancer",
"hospital"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "45f5a1e883337237e63f08832e5e572381740a310c19478f1c65ef11633b939a",
"md5": "829d1854dd6057a81d7be138381ea86a",
"sha256": "98b04f30ca99e10169ba0c17fcdc3114a8bf6c275aa3472dbb939585f84c1adb"
},
"downloads": -1,
"filename": "dicomcrop-0.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "829d1854dd6057a81d7be138381ea86a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 6948,
"upload_time": "2023-01-29T23:28:45",
"upload_time_iso_8601": "2023-01-29T23:28:45.800657Z",
"url": "https://files.pythonhosted.org/packages/45/f5/a1e883337237e63f08832e5e572381740a310c19478f1c65ef11633b939a/dicomcrop-0.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3878bd81a3c31940ee8490867f06f0d02058c895d788db3247e40d08f15ae2e8",
"md5": "612e45285641c0071b38096c64119dc7",
"sha256": "058a765eedc266cf2328ae8190caf37292c3495b6fdc5390400b830ee46ec472"
},
"downloads": -1,
"filename": "dicomcrop-0.6.tar.gz",
"has_sig": false,
"md5_digest": "612e45285641c0071b38096c64119dc7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 6228,
"upload_time": "2023-01-29T23:28:47",
"upload_time_iso_8601": "2023-01-29T23:28:47.467806Z",
"url": "https://files.pythonhosted.org/packages/38/78/bd81a3c31940ee8490867f06f0d02058c895d788db3247e40d08f15ae2e8/dicomcrop-0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-29 23:28:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "falcucci",
"github_project": "dicomcrop",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "dicomcrop"
}