Comments (3)
Fix in #17 . Added to the lasted release PyOrthanc 1.11.5.
from pyorthanc.
Hi @jrkerns,
Absolutely, that would be a great addition.
I am thinking to pass an Orthanc
object instead of the server information.
Something like that:
def find(orthanc: Orthanc, patient_filter, ....):
from pyorthanc.
Well, it's your lib so you can do what you want, but in my experience top-level functions usually take primitives only in their parameters. E.g. the user will always have to do:
orthanc = Orthanc(...)
results = find(orthanc, ...)
which seems wordy, but it's mostly an aesthetic problem to me.
Another approach would be to simply make find
a method of the Orthanc
instance. So
orthanc = Orthanc(...)
orthanc.find(...)
That's my favorite solution, but know I have a bias for classes 😄
I see you have async options as well. In theory, you could keep the best of both worlds and still have a top level function per your suggestion and then use that in your method. Assuming the solution you proposed you can also do:
from pyorthanc import find
class Orthanc:
def find(self, ....):
return find(self, ...)
class AsyncOrthanc:
def find(self, ...):
yield find(self, ...)
I'm not an async guy so forgive the async simplification.
from pyorthanc.
Related Issues (20)
- {Feature request} Ability to edit Orthanc config file HOT 2
- Better documentation HOT 1
- Allow to modify tags directly from Patient/Study/Series/Instance objects HOT 1
- Missing useful attribute in pyorthanc.Study HOT 1
- Question: The behavior of find function HOT 1
- HTTPX Timeout setting not synced w/ Orthanc setting HOT 5
- Orthanc unable to connect with username HOT 1
- Patient.__repr__() fails when patient has no PatientID HOT 1
- Processing "large" DICOM datasets - ReadTimeout: timed out error HOT 4
- Raw_response option HOT 3
- import pydicom throwing "TypeError" HOT 2
- `orthanc_sdk` does not always provide autocomplete HOT 1
- Hash DICOM identifiers to Orthanc identifiers HOT 1
- Update the `pyotrthanc.orthanc_sdk` to the new Python Plugin 4.1 HOT 1
- shared-tags in series HOT 2
- Add easier access to parent resources HOT 1
- Series description not accessible from series.description attribute HOT 1
- Change test Dockerfile base image from osimis/orthanc to orthancteam/orthanc HOT 1
- Add `.get_main_tags()` or `.get_main_dicom_tags()` alias for `.get_main_information()` methods HOT 2
- Few resource properties should always query the Orthanc server? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyorthanc.