You retrieve the numpy array content correctly but then you write it out to file incorrectly (you write it as a byte array, and since each voxel is stored as int16, you get two numbers for each voxel). Writing out a 3D array as text file should be avoided (it takes about 100x more time to read and write, takes much more space than necessary, not clear how to interpret the data, no other software in the world would expect input data in that format, etc.). But if you really must do it then you need to flatten the array first and then write it out:
but if i using thins method i cannot get color method.
My ultimate goal is to:
I have two nrrd files, one nrrd file contains medical imaging information,
Another nrrd file contains only information from the Labelmap.
The first method combines the two nrrd files, the second method takes the coordinates of the Labelmap and tries to color the coordinates to another nrrd file.
For the second method, I have stored the labelmap as text and see if it is accessible.
Is there a way to combine two nrrd files in 3D Slicer?
I want to auto annotation software using deep learning. So i labeling in image’s some part.
if i make a deep learning model that time input file is patient’s nrrd file. reasult is annotation on image.
So i think to combine two files works necessary