Saravanan666/pypi-org huggingface dataset:
Package: diclipy
Description:diclipy- CLI python script for posting/reading/commenting onDiaspora*pod written aroundDiaspyAPIDependencies:python3diaspy-api(Github)clap-api(Github)Usage:Rundiclipy-hfor help.Config folder: ~/.diclipyDoc.:http://pythonhosted.org/diclipyInstall:pip3 install diclipyIf you get errors, install from git:clap:download and unpackclapor clonerepocdtoclapfolderpip3 install .diaspy:download and unpackdiaspyor clonerepocdtodiaspyfolderpip3 install .diclipy:download and unpackdiclipyor clonerepo(mirror)cdtodiclipyfolderpip3 install .
Package: dicmer
DicMerDicMer is a Python mini library for recursively merging dictionaries.Build statusFeaturesUnlimited number and depth of source dictionaries.Doesn't modify source dictionaries.Properly merges lists.RequirementsPython >=3.5InstallationpipinstalldicmerUsageFollowing example:fromdicmerimportdict_mergea={'string':'Lorem Ipsum','dicts':{'b1':'It is simply dummy text','b2':{'b2_1':'Printing and typesetting industry','b2_2':'It has survived not only five centuries',}},'list':['What is Lorem Ipsum?','Where does it come from?',]}b={'dicts':{'b2':{'b2_1':'WARNING: This key was overwritten!','b2_3':'WARNING: This key was aded!',},'b3':'WARNING: This key was added!'},'list':['Why do we use it?','Where can I get some?',],'new key':{'I am':'a new string!'}}print(dict_merge(a,b))Will provide following result:{'string':'Lorem Ipsum','dicts':{'b1':'It is simply dummy text','b2':{'b2_1':'WARNING: This key was overwritten!','b2_2':'It has survived not only five centuries','b2_3':'WARNING: This key was aded!'},'b3':'WARNING: This key was added!'},'list':['What is Lorem Ipsum?','Where does it come from?','Why do we use it?','Where can I get some?'],'new key':{'I am':'a new dict!'}}DocumentationSee usage example.Testingpythonsetup.pytestormaketestContributingIf you want to contribute to a project and make it better, your help is very
welcome. Contributing is also a great way to learn more about social coding on
Github, new technologies and and their ecosystems and how to make constructive,
helpful bug reports, feature requests and the noblest of all contributions:
a good, clean pull request.Create a personal fork of the project on Github.Clone the fork on your local machine. Your remote repo on Github is calledorigin.Add the original repository as a remote calledupstream.If you created your fork a while ago be sure to pull upstream changes into
your local repository.Create a new branch to work on. Branch fromdevelopif it exists, else frommaster.Implement/fix your feature, comment your code.Follow the code style of the project, including indentation.If the project has tests run them.Write or adapt tests as needed.Add or change the documentation as needed.Squash your commits into a single commit with git's interactive rebase. Create
a new branch if necessary.Push your branch to your fork on Github, the remoteorigin.From your fork open a pull request in the correct branch. Target the project'sdevelopbranch if there is one, else go formaster.If the maintainer requests further changes just push them to your branch.Once the pull request is approved and merged you can pull the changes fromupstreamto your local repo and delete your extra branch(es).And last but not least: Always write your commit messages in the present tense.
Your commit message should describe what the commit, when applied, does to the
code – not what you did to the code.RoadmapNone.SupportIf you have any issues or enhancement proposals feel free to report them via
project'sIssue Tracker.AuthorsOleksandr Shepetko-- initial work.CreditsNone.LicenseThis project is licensed under the MIT License. See theLICENSE.mdfile for details.
Package: dico-api
dicoKeep in mind that this project is still WIP, therefore it might be unstable.Yet another Discord API wrapper for Python, aimed to follow Discord API format as much as possible but also simple and easy to use.Discord ServerFeaturesDiscord v10 API (including Threads, components, context menus, etc.)Full interaction supportAPI-Only supported, with aiohttp-based or requests-based HTTP client.More soon™InstallationDevelopment Version:pip install -U git+https://github.com/dico-api/dicoPyPi(Not Recommended):pip install -U dico-apiQuick ExampleAPI Clientimportdicoapi=dico.APIClient("APPLICATION_TOKEN_HERE",base=dico.HTTPRequest)# You may use AsyncHTTPClient for async support.# All endpoints are implemented, and for the example request_user (= Get User) will be used.user=api.request_user()# You may pass any user ID or it will be the application itself.# You may use either int, str, dico.Snowflake, or dico.User itself.print(user.username)Websocket Clientimportdicoclient=dico.Client("YOUR_BOT_TOKEN_HERE",intents=dico.Intents.full())@client.on_message_createasyncdefon_message_create(message:dico.Message):ifmessage.content.startswith("!hello"):awaitmessage.reply("Hello, World!")client.run()More examples are inhere.RequirementsPython 3.7+Extra Libsdico-interactiondico-command
Package: dico-command
dico-commandCommand handler for dico.Note: Docs is still not ready.Exampleimportdicoimportdico_commandbot=dico_command.Bot("YOUR_TOKEN_HERE","!",intents=dico.Intents.full())@bot.command("test")asyncdeftest(ctx:dico_command.Context):awaitctx.send("Hello, World!")bot.run()Using Addon/module:main.py:importdicoimportdico_commandbot=dico_command.Bot("YOUR_TOKEN_HERE","!",intents=dico.Intents.full())bot.load_module("addons.test")bot.run()addons/test.py:importdico_commandclassAddonTest(dico_command.Addon,name="Addon Test"):# name=... is optional@dico_command.command(name="addon")asyncdefexample(self,ctx:dico_command.Context):awaitctx.send(f"Hello! This is addon `{self.name}`.")defload(bot):# Implementing function `load` is required. You may do any actions here.bot.load_addons(AddonTest)defunload(bot):# Implementing function `unload` is required. You may do any actions here.bot.unload_addons(AddonTest)Note that using async is forced unlike dico itself.
Package: dico-interaction
dico-interactionInteraction module for dico.FeaturesWebserver included, powered by aiohttp.Easier interaction usage.Installationpip install -U dico-interactionExampleGateway ClientfromdicoimportClient,Button,ActionRow,ButtonStylesfromdico_interactionimportInteractionClient,InteractionContextclient=Client("BOT_TOKEN")interaction=InteractionClient(client=client)@interaction.slash(name="hello",description="Say hello.")asyncdefhello(ctx:InteractionContext):button=Button(style=ButtonStyles.PRIMARY,label="Hello!",custom_id=f"hello{ctx.id}")awaitctx.send("Hello, World!",components=[ActionRow(button)])@interaction.context_menu(name="say",menu_type=3)asyncdefsay_menu(ctx:InteractionContext):awaitctx.send(f"You said:{ctx.target.content}")@interaction.component_callback("hello")asyncdefhello_callback(ctx:InteractionContext):awaitctx.send("Hello again!",ephemeral=True)client.run()Webserverimportssl# SSL is forced to register your webserver URL to discord.fromdicoimportButton,ActionRow,ButtonStylesfromdico_interactionimportInteractionClient,InteractionWebserver,InteractionContextbot_token=""bot_public_key=""interaction=InteractionClient(respond_via_endpoint=False)server=InteractionWebserver(bot_token,bot_public_key,interaction)@interaction.slash(name="hello",description="Say hello.")asyncdefhello(ctx:InteractionContext):button=Button(style=ButtonStyles.PRIMARY,label="Hello!",custom_id=f"hello{ctx.id}")awaitctx.send("Hello, World!",components=[ActionRow(button)])@interaction.context_menu(name="say",menu_type=3)asyncdefsay_menu(ctx:InteractionContext):awaitctx.send(f"You said:{ctx.target.content}")@interaction.component_callback("hello")asyncdefhello_callback(ctx:InteractionContext):awaitctx.send("Hello again!",ephemeral=True)ssl_context=ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)ssl_context.load_cert_chain("cert.pem","privkey.pem")server.run(host='0.0.0.0',port=1337,ssl_context=ssl_context)
Package: dicom2cloud
Clinic2Cloud - A platform independent graphical user interface for anonymizing and uploading clinical brain scans to an image processing cloud instanceCurrent image processing techniques have reached a high level of sophistication and allow the extraction of extensive information from medical imaging data. The problem is that most of these modern post processing techniques are not applied in a clinical setting, because the software developed by scientists is difficult to use, often does not run on operating systems used by clinicians, and requires extensive hardware resources. The integration of new post processing techniques by vendors often takes many years, if the vendors take the risk at all to implement a new technique. One solution to bring modern image processing into the clinic would be to take the medical data outside of the clinic and utilize a powerful cloud instance where all tools are installed and the clinician can upload the data. The problem however is, that medical data contains sensitive information that cannot be easily removed, such as facial features in magnetic resonance imaging data of the brain.Modern image processing algorithms could potentially have a high clinical impact and could help diagnose a variety of diseases, like Multiple sclerosis, Parkinson, and other neurodegenerative diseases. Unfortunately the use of new exciting techniques is currently limited to a few specialized centers where expertise exists to run these algorithms. This severely limits the translation of research into clinics and it often takes years until vendors implement new processing techniques into their clinical platforms.The ideal solution would be a platform-independent (win, mac, linux) software/browser plugin that is easy to use, reads standard DICOM data, anonymizes the data and uploads it to a cloud instance and starts the processing. Anonymization of brain scans needs to remove facial features so that patients cannot be re-identified in a 3D rendering of their head. However, it is not possible to simply cut off the area where the face is, as this would affect registration tools by creating artificial edges.
Package: dicom2fem
DICOM2FEMAboutGeneration of finite element meshes using computed tomography scans.
Segmentation is based on the graph cut algorithm.RequirementsInstall the required packages:pip install pygco scikit-learn loguru pydicom meshio imma imcut seededitorqt io3dInstallationDownload the code from the git repository:git clone git://github.com/vlukes/dicom2femorUsepip:pip install git+git://github.com/vlukes/dicom2femRunning the programTo run DICOM2FEM use the following command:python dicom2fem/dicom2fem.pyLinkshttps://github.com/vlukes/dicom2femhttp://sfepy.org/dicom2femAuthorVladimir LukešLicenseMIT license
Package: dicom2jpg
dicom2jpgConverts DICOM toJPG/PNG/BMP/TIFFandnumpy.ndarrayInstallationpip install dicom2jpgIntrodunctionimport dicom2jpg

dicom_img_01 = "/Users/user/Desktop/img01.dcm"
dicom_dir = "/Users/user/Desktop/Patient_01"
export_location = "/Users/user/Desktop/BMP_files"

# convert single DICOM file to jpg format
dicom2jpg.dicom2jpg(dicom_img_01)  

# convert all DICOM files in dicom_dir folder to png format
dicom2jpg.dicom2png(dicom_dir)  

# convert all DICOM files in dicom_dir folder to bmp, to a specified location
dicom2jpg.dicom2bmp(dicom_dir, target_root=export_location) 

# convert single DICOM file to numpy.ndarray for further use
img_data = dicom2jpg.dicom2img(dicom_img_01)

# convert DICOM ByteIO to numpy.ndarray
img_data = dicom2jpg.io2img(dicomIO)dicom2jpgconverts DICOM images toJPG/PNG/BMP/TIFFformats and tonumpy.ndarray.
It piplines the lookup transformations by applying Modality LUT, VOI LUT, and Presentation LUT to the images,
which makes output files looks like what we see on standard DICOM viewers.dicom2jpg.dicom2jpg(origin, target_root=None, anonymous=False, multiprocessing=True)dicom2jpg.dicom2png(origin, target_root=None, anonymous=False, multiprocessing=True)dicom2jpg.dicom2bmp(origin, target_root=None, anonymous=False, multiprocessing=True)dicom2jpg.dicom2tiff(origin, target_root=None, anonymous=False, multiprocessing=True)origin can be a single DICOM file, a folder, or a list/tuple of file/foldertarget_root would be the root folder of the first file/folder if not specifiedexported files paths would betarget_root / Today / PatientID_Filetype / StudyDate_StudyTime_Modality_AccNum / Ser_Img.Filetypeanonymous files paths would betarget_root / Today / Patient_SerialNum / ModalitySerialNum_Modality / Ser_Img.Filetypedicom2jpg.dicom2img(origin)dicom2jpg.io2img(dicomIO)converting dicom files or ByteIO to ndarrayndarray is in 8 bit; RGB format if it's a color imageImage examplesCTMRCXRTodoSupport multi-frame imagesImage compressionSupport overlaysPerformanceEnvironment: Windows10, Jupyter Notebook, Python 3.8.10598MB 1873 files {'CT': 1528, 'CR': 52, 'MR': 174, 'DX': 36}Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz. 4 Cores (hyper-threading off)Tested on Ramdisk (no physical HDD was tortured :P)multiprocessinganonymousduration (seconds)FalseTrue154.6-159.7TrueTrue79.2-82.9FalseFalse157.9-162.8TrueFalse56-58.5
Package: dicom2tar
[![CircleCI](https://circleci.com/gh/khanlab/dicom2tar/tree/master.svg?style=svg)](https://circleci.com/gh/khanlab/dicom2tar/tree/master)
# dicom2tar
Tool for extract compressed files(if any), sort dicom files according to given rule, or tar the sorted, to a destination directory.Check dicom2tar.py for example.
Package: dicom3d
dicom3dis a comprehensive Python package for reconstructing arbitrary defined 3D sections
from volumetric medical scans (CTs or RMNs), scale accurate and with a builtin pixel-to-world
coordinate mapping system.It comes preloaded with the necessary mathematical backend to manipulate space information from
medical scans, and provides a mapping system that can transparently handle different imaging
properties such as pixel density, dataset thickness, patient orientation, patient positioning,
etc.DependenciesIt relies onpydicomfor loading DICOM medical images andnumpyfor array manipulation.RepositoryFor source code and documentation visitdicom3dGitHubrepositoryInstallationFromPyPipackage repository:pip install dicom3dLicenseLicence for this Python package is theMIT LicenseunderCopyright (c) 2020 Bitdefender.AuthorDeveloped and maintained byAlex Mircescu(amircescu@bitdefender.com)
Package: dicom-anonymiser
DICOM Anonymisation ToolThis tool is designed to either:Anonymise a single DICOM file, orAnonymise a directory (recursively) of DICOM filesAnonymised files may be saved to a different directory, and may be renamed with_anonsuffix.The script has a default list of tags to anonymise, but the user may point to a custom list.usage: main.py [-h] [-t TAGFILE] [-i] source destination

Anonymise DICOM images

positional arguments:
  source                location of dicom file or folder to anonymise
  destination           Destination folder to save anonymised images

optional arguments:
  -h, --help            show this help message and exit
  -t TAGFILE, --tagfile TAGFILE
                        path to custom tags file
  -i, --intact          Leave filenames unchangedInstallationInstall python3.8+Create a virtual env where you want to install:$> python3 -m venv dicom_anonActivate the environment$> source dicom_anon/bin/activateInstall the package with pip$> pip install dcm_anonHaving the environment activated, run from the terminal with the help flag to show the above usage info$> anonymise --helpEach anonymisation run will generate a log file placed in the environment's package directory:dicom_anon/lib/python3.x/site-packages/dicom_anonymiser/logs/Default location of tags filedicom_anonymiser/lib/python3.x/site-packages/dcm_anon/tags/If you want to use your own tags, you can specify them indicom_anonymiser/lib/python3.x/site-packages/dcm_anon/tags/user_tags.csvUsageAlways activate the environment$> source dicom_anon/bin/activateSingle fileanonymise "/Users/me/dcm/original/a_file.dcm" "/Users/me/Desktop/anonymised/"Folderanonymise "/Users/me/dcm/original/" "/Users/me/Desktop/anonymised/"Using a custom list of tagsanonymise "/Users/me/dcm/original/" "/Users/me/Desktop/anonymised/" -t "/path/to/user_tags.csv"Keep same filenames (will overwrite if destination directory is same as source)anonymise "/Users/me/dcm/original/" "/Users/me/Desktop/anonymised/" -i
Package: dicombrowser
DicomBrowserThis is a lightweight portable Dicom browser application written in Python.
It allows Dicom directories to be loaded, images and tag data viewed, and not much else aside.
This is intended to be a cross-platform utility suitable for previewing Dicom data rather than doing any sort of processing.InstallationDicomBrowser requiresPython 3.7+,PyQt5,numpy,pydicomandpyqtgraph, and optionally the libraries for pydicom used to load JPEG data.Installation throughpip:pip install dicombrowserInstallation from repo:git clone https://github.com/ericspod/DicomBrowser.git
cd DicomBrowser
pip install .This will create the entry pointdicombrowserwhich accepts DICOM directories or zip files containing them:dicombrowser MAGIX.zipDicomBrowser can be run directly as a module from the repo:python -m dicombrowserDockerA Dockerfile is included, to build the image with the following command:docker build . -t dicombrowser:latestand then to run the created image "dicombrowser" on a X Windows host use a command like the following:docker run -ti --rm --net=host -e DISPLAY -v "$HOME/.Xauthority:/root/.Xauthority:rw" dicombrowserRunningxhost +local:dockermay be necessary to add permissions and allow the container to access the X network ports.AuthorsDicomBrowser is developed and maintained by Eric Kerfooteric.kerfoot@kcl.ac.uk.LicenseCopyright (C) 2016-22 Eric Kerfoot, King's College London, all rights reservedThis file is part of DicomBrowser.DicomBrowser is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.DicomBrowser is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License along
with this program (LICENSE.txt).  If not, seehttp://www.gnu.org/licenses/
Package: dicomcat
DICOMcatDICOMcat is a simple, pip-installable python package for displaying DICOM files in iTerm2 similar
toimgcatfor conventional images andniicatfor nifti images. This might be useful for quickly viewing DICOMs on a remote
server in your terminal.UsageDICOMcat can be used, either within a python script or from the terminalTo use in terminal, navigate to the DICOM folder/file and enter$ dicomcat EXAMPLE_FILEIn a python script, use as followsimport dicomcat path='path/to/dicom' dicomcat.dicomcat(path)There are additional options to change the number of rows, downscaling, or maximum number of slices shown (when displaying
a directory of DICOM slices).Examples/TestingThere are a number of example DICOMS to test with the repo. To run the examples, runpython -m unittestin the package directoryExample Dicom Sources:LumbarDicomExample- Radiopedia.org, Case courtesy of Prof. Frank GalliardsourceHead- Head CT, courtesy of Visual Human ProjectsourceKnee- Knee CT,  courtesy of Visual Human ProjectsourceBrainExample- Brain MRI, courtesy of Jeff Mather, Mathworkssource
Package: dicomcrop
dicomcropdicomcrop 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 cropAdjusting the size of the cropped areaResizing the cropped imageSaving the cropped image in various formatsPrepare bedside medical images for machine learning and image interpretation. dicomcropper isolates the dynamic component of an image and strips away the rest.InstallationRequires python 3.7 or higherInstall with pip:pip3 install dicomcrop --upgradecropAutomatically crop away static borders as much as you needdicomcrop--dir<dir>Automatically crop away static borders in a single filedicomcrop--image<image>Generates cropped images encrypting private informationsdicomcrop--dir<dir>--encryptedIt's possible to disable the encrypted featuredicomcrop--dir<dir>--encrypted=FalseThere is an easter egg to fetch informations from a spreadsheet file:dicomcrop--dir<dir>--encrypted--egg=Trueall these extra commands can be applied following the--imagecommandedgesExtracts the edges around an medical imageReturns the distance in pixels in the form:
left,right,top,bottomdicomcrop--edgesexample.DCM
>(293,17,969,696)secretsReturns a secret string from the library:dicomcrop--secret
>e06dda30-5312-4623-936e-20b669c10495tokensGenerate a hash string:dicomcrop--token
>e06dda30-5312-4623-936e-20b669c10495Generate a encrypted hash scring:dicomcrop--token--encrypted
>eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXRpZW50X2lkIjoiZDQxMmY4MmUtY2U5Ni00MTg4LWEwZTktNWFmMTIzYTlkMDZlIn0._xhyeXCoaboKH8rqvzKCWa6Zg7ne9bjSHn58c91aLCcsummaryCommandInputOutputcrop
Package: dicom-csv
Utils for gathering, aggregation and handling metadata from DICOM files.InstallationFrom pippip install dicom-csvor from GitHubgitclonehttps://github.com/neuro-ml/dicom-csvcddicom-csv
pipinstall-e.Examplejoin_tree>>>fromdicom_csvimportjoin_tree>>>folder='/path/to/folder/'>>>meta=join_tree(folder,verbose=2)>>>meta.head(3)AccessionNumberAcquisitionDate...WindowCenterWindowWidth00000262123720200922...-500.01500.000000262123720200922...-40.0400.000000262123720200922...-500.01500.03 rows x 155 columnsExample load 3D imagefrom a series of dicom files (each containing 2D image)fromdicom_csvimportjoin_tree,order_series,stack_imagesfrompydicomimportdcmreadfrompathlibimportPath# 1. Collect metadata from all dicom filesfolder=Path('/path/to/folder/')meta=join_tree(folder,verbose=2)# 2. Select series to loaduid='...'# unique identifier of a series you want to load,# you could list them by `meta.SeriesInstanceUID.unique()`series=meta.query("SeriesInstanceUID==@uid")# 3. Read files & combine them into a single volumeimages2d=[dcmread(folder/row[1].PathToFolder/row[1].FileName)forrowinseries.iterrows()]image3d=stack_images(order_series(images2d))DocumentationYou can find the documentationhere.
Package: dicom-decompress
dicom-decompressA command-line utility for decompressing DICOM files with compressed pixel data. Optionally, ff photometric
interpretation is one ofYBR_FULL,YBR_FULL_422,PALETTE COLORpixel data will be transcoded toRBG.Installationpipinstalldicom-decompressThis will install the terminal commanddicom-decompressin your environment.Some transfer syntaxes need the c++ libraryGDCMinstalled. Install this bycondainstallgdcm-cconda-forgeSeehereon how to install
conda.To decompress a single file rundicom-decompressin.dcmout.dcmwherein.dcmis the file to decompress andout.dcmis the decompressed target file. To attempt transcoding for non
monochrome or rgb images add the--transcodeflag:dicom-decompress--transcodein.dcmout.dcmTo decompress multiple files in-place run e.g.find.-name"*.dcm"-exececho{}\;-execdicom-decompress--transcode{}{}\;DependenciesnumpypydicomDevelopmentUpdate your.pypircfile in your home directory to includeindex-servers = 
	pypi
	<your other servers...>

[pypi]
repository: https://upload.pypi.org/legacy/
username: <your pypi username>

...To build:python setup.py sdist bdist_wheel(requires python3 + wheel package)To install:pip install --force-reinstall dist/dicom_decompress-x.y.z-py3-none-any.whl,(x.y.z is version, see
setup.py)To publishInstall twine:pip install twineBuild package (cf. above)Make sure it passes the twine check:twine check dist/*Publish:twine upload dist/*