Skip to content
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

How to use ITKMorphologicalContourInterpolation with two slices #118

Open
9Cirno9 opened this issue Mar 4, 2024 · 4 comments
Open

How to use ITKMorphologicalContourInterpolation with two slices #118

9Cirno9 opened this issue Mar 4, 2024 · 4 comments

Comments

@9Cirno9
Copy link

9Cirno9 commented Mar 4, 2024

@dzenanz
I am sorry to bother you, may I seek expertise on this matter?
Now I have some segmented slices, the type of them is vtkSmartPointer< vtkImageData >
such as:
I40_2
For example, I have two slices in this type, named image1 and image2.Now I want to make image1 as the first slices and image2 as the last slices, put them into ITKMorphologicalContourInterpolation. But the MCI filter requires the type of "itk::Image< unsigned char, 3 >".
How can I transform these two "vtkSmartPointer" images to "itk::Image< unsigned char, 3 >", what functions or class can I use?
Thanks for your Suggestions two months before, I had posted this question on the forum,but I haven't heard back yet. If its not too much trouble, would you mind sharing your thoughts on this issue?
On behalf of my teachers and schoolmates, I sincerely appreciate your help.

@9Cirno9
Copy link
Author

9Cirno9 commented Mar 4, 2024

image https://discourse.itk.org/t/use-itk-morphologicalcontourinterpolator/6417

@dzenanz
Copy link
Member

dzenanz commented Mar 4, 2024

I already answered it here:

@9Cirno9 I now realized from your email, that you might want interpolation between two 2D images. This can be accomplished by constructing an empty 3D image, and setting those two 2D images as the first and last slice, then running MCI filter on it, in a way similar to how it is done in tests.

@9Cirno9
Copy link
Author

9Cirno9 commented Mar 5, 2024

I already answered it here:

@9Cirno9 I now realized from your email, that you might want interpolation between two 2D images. This can be accomplished by constructing an empty 3D image, and setting those two 2D images as the first and last slice, then running MCI filter on it, in a way similar to how it is done in tests.

I think so, but I dont know what functions or class can I use to code about inserting the slices as the first and last.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants