Replies: 4 comments
-
Just do the normal numpy array concatenation. arr1 = np.asarray([[1, 2], [3, 4]])
arr2 = np.asarray([[5, 6], [7, 8]])
arr = np.concatenate((arr1, arr2), axis=1)
ds.Rows, ds.Columns = arr.shape
ds.PixelData = arr.tobytes()
# etc... |
Beta Was this translation helpful? Give feedback.
-
Hi there,
But I couldn't understand how can I add 120 images pixe_array |
Beta Was this translation helpful? Give feedback.
-
I have no idea what you're trying to do, so 🤷♂️ |
Beta Was this translation helpful? Give feedback.
-
A python function that could help. This is when you have a single .dcm file with multiple slides in it. Just pass the path string to the function. and also replace png_path with a path to save the PNG.
If you have a folder of single .dmc files, may be you can read each file separetely and append it to an array and make it the darray variable in the function. Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
Hi there,
I am looking for some suggestion regarding my problem.
I was able to convert a number of png image into DICOM and now I want to concatenate them into a single frame. How can I achieve that?
Any suggestion
Beta Was this translation helpful? Give feedback.
All reactions