How to merge 3D models

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How to merge 3D models

Luo, Jiajia
Hi all,
 
A qucik question for merging two 3D models:
 
I generated two 3D models, one from axial and another from coronal. Is there a good way to merge the two 3D model into one model?
 
I have tried some ways to do that, one is ModelIntoLabelVolume which created a label map in axial view using the model generated from the coronal slices. But this one finally worked not well.
 
Jiajia

_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: How to merge 3D models

swallace
Hi JiaJia,

Would using the Image Label Combine module in Slicer3.5 be a suitable
workaround?

You can make labelmaps for each 3D model in ModelIntoLabelVolume, then use
those 2 newly created labelmaps in Image Label Combine to make 1 labelmap,
then apply that to the Model Maker.

If anyone has a better method, chime in!

Stuart

> Hi all,
>
> A qucik question for merging two 3D models:
>
> I generated two 3D models, one from axial and another from coronal. Is
> there
> a good way to merge the two 3D model into one model?
>
> I have tried some ways to do that, one is ModelIntoLabelVolume which
> created
> a label map in axial view using the model generated from the coronal
> slices.
> But this one finally worked not well.
>
> Jiajia
> _______________________________________________
> slicer-users mailing list
> [hidden email]
> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
> To unsubscribe: send email to
> [hidden email] with unsubscribe as the
> subject

_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: How to merge 3D models

Daniel Haehn
In reply to this post by Luo, Jiajia
Hi Jiajia,

if you want to use code, you could use the Python console to do the
following:

from Slicer import slicer
model1 = slicer.MRMLScene.GetNodeByID('vtkMRMLModelNode1')
model2 = slicer.MRMLScene.GetNodeByID('vtkMRMLModelNode2')
add = slicer.vtkAppendPolyData()
add.AddInput(model1.GetPolyData())
add.AddInput(model2.GetPolyData())
newmodel = add.GetOutput()
model1.SetAndObservePolyData(newmodel)
model1.SetModifiedSinceRead(1)
model1.GetModelDisplayNode().SetPolyData(model1.GetPolyData())

After this, the first Model should be the merged version of the two.

HTH,
Daniel

On Mon, 22 Feb 2010 16:43:32 -0500, "Luo, Jiajia" <[hidden email]>
wrote:

> Hi all,
>
> A qucik question for merging two 3D models:
>
> I generated two 3D models, one from axial and another from coronal. Is
> there
> a good way to merge the two 3D model into one model?
>
> I have tried some ways to do that, one is ModelIntoLabelVolume which
> created
> a label map in axial view using the model generated from the coronal
> slices.
> But this one finally worked not well.
>
> Jiajia

_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: How to merge 3D models

Luo, Jiajia
In reply to this post by swallace
Hi Stuart,
 
I have tried this way.
 
One problem is that the new labelmap generated from ModelIntoLabelVolume seems not good for making the new model.
 
Attached the new labelmap which is from the original model. The quality is bad. I am not sure it is the problem of slicer, or any special procedure required.
 
Have you met the problem before?
 
Thanks,
 
Jiajia


 
On Tue, Feb 23, 2010 at 12:08 PM, <[hidden email]> wrote:
Hi JiaJia,

Would using the Image Label Combine module in Slicer3.5 be a suitable
workaround?

You can make labelmaps for each 3D model in ModelIntoLabelVolume, then use
those 2 newly created labelmaps in Image Label Combine to make 1 labelmap,
then apply that to the Model Maker.

If anyone has a better method, chime in!

Stuart

> Hi all,
>
> A qucik question for merging two 3D models:
>
> I generated two 3D models, one from axial and another from coronal. Is
> there
> a good way to merge the two 3D model into one model?
>
> I have tried some ways to do that, one is ModelIntoLabelVolume which
> created
> a label map in axial view using the model generated from the coronal
> slices.
> But this one finally worked not well.
>
> Jiajia
> _______________________________________________
> slicer-users mailing list
> [hidden email]
> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
> To unsubscribe: send email to
> [hidden email] with unsubscribe as the
> subject



_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: How to merge 3D models

Luo, Jiajia
In reply to this post by swallace
Sorry, forgot the attachment.

On Tue, Feb 23, 2010 at 12:08 PM, <[hidden email]> wrote:
Hi JiaJia,

Would using the Image Label Combine module in Slicer3.5 be a suitable
workaround?

You can make labelmaps for each 3D model in ModelIntoLabelVolume, then use
those 2 newly created labelmaps in Image Label Combine to make 1 labelmap,
then apply that to the Model Maker.

If anyone has a better method, chime in!

Stuart

> Hi all,
>
> A qucik question for merging two 3D models:
>
> I generated two 3D models, one from axial and another from coronal. Is
> there
> a good way to merge the two 3D model into one model?
>
> I have tried some ways to do that, one is ModelIntoLabelVolume which
> created
> a label map in axial view using the model generated from the coronal
> slices.
> But this one finally worked not well.
>
> Jiajia
> _______________________________________________
> slicer-users mailing list
> [hidden email]
> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
> To unsubscribe: send email to
> [hidden email] with unsubscribe as the
> subject



_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject

ModelIntoLabelMap.jpg (76K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to merge 3D models

Luo, Jiajia
In reply to this post by Daniel Haehn
Hi Daniel,
 
This is my first time to use Python console. I just copied and excuted your code into Python Console v1.4 line by line (replaced the modelnode1 and modelnode2 for my model). But I did not find any difference for the orginal models. Anything wrong?
 
Jiajia

On Tue, Feb 23, 2010 at 12:48 PM, Daniel Haehn <[hidden email]> wrote:
Hi Jiajia,

if you want to use code, you could use the Python console to do the
following:

from Slicer import slicer
model1 = slicer.MRMLScene.GetNodeByID('vtkMRMLModelNode1')
model2 = slicer.MRMLScene.GetNodeByID('vtkMRMLModelNode2')
add = slicer.vtkAppendPolyData()
add.AddInput(model1.GetPolyData())
add.AddInput(model2.GetPolyData())
newmodel = add.GetOutput()
model1.SetAndObservePolyData(newmodel)
model1.SetModifiedSinceRead(1)
model1.GetModelDisplayNode().SetPolyData(model1.GetPolyData())

After this, the first Model should be the merged version of the two.

HTH,
Daniel

On Mon, 22 Feb 2010 16:43:32 -0500, "Luo, Jiajia" <[hidden email]>
wrote:
> Hi all,
>
> A qucik question for merging two 3D models:
>
> I generated two 3D models, one from axial and another from coronal. Is
> there
> a good way to merge the two 3D model into one model?
>
> I have tried some ways to do that, one is ModelIntoLabelVolume which
> created
> a label map in axial view using the model generated from the coronal
> slices.
> But this one finally worked not well.
>
> Jiajia



_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject