Comments (7)
Nice to hear that you find the code useful :)
Yes, you can include labels (ensuring that the affine matrices are modified correctly):
Line 85 in 82d00af
For example, if you have a label file label.nii.gz
and one modality you would specify it as:
from unires.struct import settings as s
s.label = ('label.nii.gz', (0, 0))
This function might give some insights into using unires as an api:
Line 7 in 82d00af
Keep in mind that your prostate images need to have good alignment between subjects as unires internal inter-subject alignment method currently only works for brain scans (it uses an atlas-based approach with a T1w brain mean image). That is, this option:
Line 77 in 82d00af
needs to be set to False. However, if you have some prostate mean image, it could be used to perform the inter-subject alignment.
from unires.
Fantastic! thanks for your response now I will work on it !
from unires.
I would like to ask something futher - precisely about "common_output" - it seem fantasic to get all of the data on the same grid - hovewer I do not see exactly how it works?
I seen that I can pass into the preproc function two dimensional list of paths to nifti files - but only one setting file
so I should put the labels into tuple like
s.label = ('labelA.nii.gz','labelB.nii.gz' )... ?
Also I have t2 (axial coronal, saggital) and adc images labels are associated with t2w image (it was annotated basically on t2 axials) - how to mark it so during registration and resampling labels will be adjusted as the t2w?
Lastly I had done experiment and all resampled files have been written - but not labels, how to specify where the modified resampled labels should be present?
Thanks for Help, and by the way tool is fantastic - It solves so many preprocessing problems at once that it seems automagical !
from unires.
If you have three images of the same 'repeat' (three T2 scans of different thick-slice direction: coronal, sagittal, axial) and the label is annotated on the axial scan, you would specify this as:
data = [['t2_c.nii.gz', 't2_s.nii.gz', 't2_a.nii.gz']]
s.label = ('label.nii.gz', (0, 2))
You have to ensure that your label image is an integer tensor with values {0, 1, ..., num_labels}
. Meaning that if you have multiple binary masks, you will need to merge these into a categorical one.
from unires.
perfect, Thanks! and if I want to put whole dataset (given I had done earlier interpatient registration ) on the same grid as described in "common_output" how to pass multiple labels? And is it problem that in some cases label will be present and in other not - only part of dataset is annotated
Thank You!
from unires.
UniRes runs on one subject at a time, not on a population. So you would have to call it multiple times, once for each subject.
from unires.
If no labels are available, then you would just call UniRes w/o labels for those subjects.
from unires.
Related Issues (11)
- Deal with cross-talk?
- Boolean values are difficult to set in the command-line tool HOT 1
- Pre-conditioning CG
- Add release/tag and dependencies version HOT 5
- nitorch.core.datasets.download_url name change HOT 2
- Implement projection operator as torch layer
- Question about how to create low-resolution images from high-resolution images to run on UniRes HOT 1
- Support read/write nifti when large number of observations. HOT 1
- Check accuracy of noise estimate
- Refactor into modules instead of using a Class
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 unires.