Comments (10)
I refrained from this step, since I didn't had the time to thoroughly check if the Python3 is error-free. Do you use that branch? If yes, did you encounter any errors till now?
from medpy.
I am using it, though only touching a subset of the code.
from medpy.
I am looking over the diff and here are some thoughts. I assume you want to keep some python 2.x support:
- I think you will lose Python 2.5 support (maybe ok?)
- you might want to be explicit here, I don't think that is correct as written in python 3
- not sure what happened here
- import print function in this file and this one and this one
- maybe try catch this import and here
from medpy.
- That is fine.
- Well spotted. Should use integer division
//
, which is also supported by 2.7. - Good question. I'll have to look into this.
- Yes, here and in many more scripts.
- Actually, this could stay like it is. First, I used
cPickle
simply for performance reasons. And second, all script inbin/
sub-folder are not actually part of the shipped version ofmedpy
.
PS: Would you mind if I assign you as collaborator to medpy
? Might facilitate things.
from medpy.
sure, sounds good
from medpy.
For 3, TIL: https://stackoverflow.com/questions/34916569/python-nested-parenthesis-function-parameter-list-invalid-syntax. Looks like Python 2 supported param unwrapping whereas python3 does not.
I started cleaning up some of the code: #57
from medpy.
Perfect, Thanks for all the valuable input already! And please don't mess up the code ;)
Regarding point 3: This is unfortunate, since it means the required parameters can't be conveniently named and thus described in the doc-string. But well, it's not a big drawback. I would suggest renaming all occurrences of xxx_todo_changeme
to boundary_term_args
respectively regional_term_args
, leave the unwrapping to the function body and adapt the function documentation accordingly.
from medpy.
@loli I would like to understand better how you were using parameter unwrapping. What do you mean about "required parameters can't be conveniently named"?
from medpy.
The Graph Cut module provides a convenience wrapper for N-D image segmentation cuts. In these arbitrary boundary and regional terms can be plugged in. Some of the more common I provide. As each of these requires other parameters, these are designated by the additional terms (a list of required arguments). The wrapper than requires the chosen boundary and/or regional terms as well as the variables it should pass to them.
For the user to know which information to pass, I chose parameter unwrapping, thus the names denote the required information. If these are condensed into a single argument named e.g. additional_args, the user wouldn't intuitively know which information is required for the used boundary/regional term.
Sorry, I'm on vacation and just have my mobile with me right now. It's difficult to give an example. You can perform the merge and I'll fix the issue when I'm back.
Great work!
from medpy.
done in: #60
from medpy.
Related Issues (20)
- Possible wrong result returned by medpy.io.load HOT 1
- Problem with opening .img/.img.hdr file HOT 1
- reduce redundant computation when computing multiple surface distance-based metrics HOT 3
- Issue with graphcut support HOT 8
- medpy.metric.binary.hd95(pre,gt) always get "1"、“1.414”、‘’1.732“.。。。 HOT 1
- Should Dice coefficient for empty result and empty reference be 1? HOT 1
- ASSD equation is wrong HOT 1
- scipy deprecations HOT 1
- anisotropic_diffusion slicer error HOT 3
- Numpy.bool is deprecated HOT 7
- Anisotropic Diffusion Numpy Warning (+ solution ?) HOT 2
- How to remove noise automatically without set any threshold value on DICOM Volume Images& 2D Images ? HOT 1
- When I use medpy.io.load to read .nii files,it always wrong. HOT 1
- Why I cannot load my CT volumns?
- metrics for multi-classes? HOT 1
- Handle few deprecations in scipy HOT 2
- Conda recipe with graphcut support HOT 2
- Broken links and incomplete notebooks HOT 2
- No module named 'load' HOT 1
- No module named 'medpy.graphcut.maxflow' HOT 6
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 medpy.