-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
convert .npy segmentation file into .nrrd #12
Comments
Hi @silkezimm, In order to give you good advice, could you please share more info about our
Usually On the other hand, image files such as
|
HI!
i solved this issue, thank you soo much for your kind reply :)
actually i have another issue with using pyradiomics.. i was wondering
wheter you can help me..
i am using pyradiomics from the command line.
i would like to know whether i extracted the features without param file or
any specification from the original image or the segmented region (with the
mask file..).
i am performing batch feature extraction with the command : pyradiomics
<path/to/input>
, this works nicely,
now i have created a parameter file in .yaml format, and it says on the
readthedocs homepage to use the --param argument in the command line. here
i struggle as to how exactly tell the software to use my specific file. can
you help me here and provide the exact command i shall write?
i hope you can help..
best
silke
Am So., 30. Juli 2023 um 14:03 Uhr schrieb Ivan Ye. Zhovannik <
***@***.***>:
… Hi @silkezimm <https://github.com/silkezimm>,
In order to give you good advice, could you please share more info about
our .npy file? Given file name filename.npy (*change to your file name*),
please run and post below:
import numpy as np
mask_array = np.load("filename.npy", allow_pickle=True)
print(f"Shape of my mask array is {mask_array.shape}")
print(f"Unique mask values are {np.unique(mask_array)}")
Usually .npy files contain only the voxel intensities and not the grid,
which can be used to understand how to place these voxel intensities in the
space.
On the other hand, image files such as .nrrd contain both the grid and
voxel intensities. Given your image file image.nrrd (*change*) please run
and post below:
import SimpleITK as sitk
image = sitk.ReadImage("image.nrrd")
print(f"Image size {sitk.GetSize(image)}, image spacing and origin: {sitk.GetSpacing(image)}, {sitk.GetOrigin(image)}")
—
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXAMGXKTJWBSSVCJM6N6LWLXSZESBANCNFSM6AAAAAA25EDBVM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@silkezimm like any other command in cmd/bash/other shell, I guess. See the usage here: https://pyradiomics.readthedocs.io/en/latest/usage.html |
Yes....I have read the documentation and still can't understand the --param
....
Sorry....
…On Thu, 3 Aug 2023, 19:58 Ivan Ye. Zhovannik, ***@***.***> wrote:
@silkezimm <https://github.com/silkezimm> like any other command in
cmd/bash/other shell, I guess. See the usage here:
https://pyradiomics.readthedocs.io/en/latest/usage.html
See more in Python’s argparse package how to pass flags such as —params
—
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXAMGXLUWDSLFHQRBYMH24DXTPRDLANCNFSM6AAAAAA25EDBVM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Dear all,
i have the problem that i have DICOM images and a npy file of segmented data as input to pyradiomics. #
i converted the DICOM images in nrrd format with 3Dslicer. now i need to convert the segmentation/label file .npy into .nrrd.
i cant solve this;> can anyone help me and provide a solution?
thank you so much,
Silke
The text was updated successfully, but these errors were encountered: