Closed gourav3017 closed 1 year ago
If you combine the 2 images into 1 image with 2 components with itk
, itkwidgets
will display a mix of the 2 components, not so much an overlay:
@PaulHax let's add the compare
function to meet @gourav3017 's needs.
Thanks @PaulHax @thewtex . But if I combine two itk images and view them using itkwidgets using the above link, I cannot have a different color map for the background image and foreground image. For my example, I want to have a grayscale for ct scan and a jet/rainbow for dose distribution
The link is an example of the image result you can currently ac heave with itkwidgets. Click the numbered tabs and the purple bar to change the color map of the components:
@PaulHax If I try to combine two itk images into one with two components using compose filter, I get an error with viewer "RuntimeError: Could not process the viewer data" since my itk image pixel type is vector now. Can you share the code for the above example where you can combine two itk images into one with two components? Sry. I am more not into C++. It would be great if you can share the code for combining images using python itk
itkwidgets can view vector images. I don't know where that error is coming from.
What version of itkwidgets are you using. Try pip install 'itkwidgets[all]>=1.0a16'
.
If that does not work, would you mind sharing a notebook showing the problem?
Following is the screenshot where viewer throws when I tried using combined image using compose image filter and get vector image.
I checked my itkwidgets version and it was installed using above command "pip install 'itkwidgets[all]>=1.0a16'". My current version is 1.0a23
I am getting that error too with the attached notebook. itkwidgets
does not like the itk.itkVectorImagePython.itkVectorImageSS3 type somehow.
Hello3DWorld.zip
ohh okay. Do you think if there is any workaround to combine the images and display it using itkwidgets? Below is the notebook example I created for combining ct and dose and it throws error using itkwidgets. You can clone the repo and run the example Share.ipynb. https://github.com/gourav3017/data.git
I'm baffled.
@bnmajor Anything we should try?
@PaulHax I was just looking into this and don't currently have an answer.... To handle the data streaming we need to be able to convert the vector image to an ngff zarr but I am not sure how to go about that right now. Unless you have some ideas on how to convert I will come back to this tomorrow morning after I meet with Matt and pick his brain.
@gourav3017 Right now I don't have a workaround but as soon as we have one (or a solution merged in) I will let you know!
@gourav3017 - I spoke with @thewtex this morning and I have opened an issue to add support for itkVectorImage
(see thewtex/ngff-zarr#10) so that we can handle these images in itkwidgets
.
@PaulHax
Thank you very much @bnmajor @PaulHax
itk.itkVectorImagePython.itkVectorImageSS3 type somehow. Hello3DWorld.zip
This now works with #638
Awesome, thanks @thewtex!
@gourav3017 Thanks for bringing this to our attention! If you have any other problems please feel free to open another issue.
How can I blend two itk images? I have CT in one image and dose distribution on the other image. I want to show CT in background with dose in foreground. Is it also possible to overlay structure contours/mask on these blended image using itkwidgets?