[vtkusers] Convert to binary image

Gonzalo Amadio gonzaloama at yahoo.com.ar
Thu May 3 09:26:22 EDT 2012


First of all, thank you, and sorry for this long mail. But I will be very
grateful if someone can help me here =D ..

I am working on a medical software. I have the skin as a mesh
(vtkPolyData), and a target inside the head. I have some obstacles (like
sulci) represented as a mitk::image.
What I want to do is to get out some cells of the vtkPolyData (the skin).
Those who "are not visible" from the the target (because some obstacle is
in the midle of the ray with origin on the target and end on the cell).
But working this obstacles as Images take too long. That is why I want to
convert them to vtkPolyData. Because for each cell, I have to compute a
lots of rays (for each point of the image), and see if the ray goes through
an obstacle or not. And with poly data I think is much faster. Is it? or
maybe some other idea.

I read what you tell me about converting the image, but I just starting
with this, and not have much experience with  vtk, itk, mitk.
So, really sorry for bothering, but I don't know what I have to use to
conver the image to binary. And also I am not working with the mitk's Gui.
I only have the image in my program.

Again, really really thank u a lot!

Gonzalo.

2012/5/3 Hila Hiler <hilahiler at gmail.com>

> Gonzalo,
> I read your q again.
>
> In order to get a vtkPolyData from mitk::Image you have to do the
> following steps:
> 1. only binary images can be converted into a polyData. so convert your
> mitk::image to binary image first.
> 2. by mitk's Gui: right click on your binaryImage->get Mesh / polyData
>
> Good luck.
>
>
> On Thu, May 3, 2012 at 1:06 PM, Hila Hiler <hilahiler at gmail.com> wrote:
>
>> Gonzalo,
>> I use Mitk.
>> I don't understand how you want to run a vtkFilter on mitk::Image. why?
>> a vtkFilter you can run on mitk::Surface or
>> mitk::Surface->getVtkPolyData();
>>
>> if you have an itk::Image and you want to do a segmentation such that
>> only positive values will be in that seg, you can use iterator as David
>> suggested or you can use the GUI of mitk:
>> right click on the image that u loaded->set threshold value to zero-> and
>> you will get a segmented image.
>>
>> Hope I helped.
>>
>>
>>
>> On Thu, May 3, 2012 at 11:35 AM, Gonzalo Amadio <gonzaloama at yahoo.com.ar>wrote:
>>
>>> Sorry for writing again..
>>> I read that MITK is like an extension of VTK and ITK.
>>> I have my Image in mitk::Image . And this is a VTK filter. And as input
>>> have a VTKimageData. Can I mix things like that?
>>>
>>> Again thank u very much!
>>>
>>>
>>> 2012/5/3 Gonzalo Amadio <gonzaloama at yahoo.com.ar>
>>>
>>>> Maybe, I am going to read about it..
>>>>
>>>> Do you know if there is an example for using that class? .. Because it
>>>> is difficult with only the Doc for me ... =(
>>>>
>>>> But I will try something..
>>>>
>>>> Thank u very much!
>>>> Gonzalo.
>>>>
>>>> 2012/5/3 Li, Wen <wen-li at uiowa.edu>
>>>>
>>>>  Gonzalo,
>>>>>
>>>>>  Maybe the vtkImageMarchingCubes can help?
>>>>>
>>>>>  Wen
>>>>>
>>>>>  On May 2, 2012, at 3:51 AM, Gonzalo Amadio wrote:
>>>>>
>>>>> Sorry for the late response..
>>>>> Yes, I want to generate a surface. I am working with 3D meshes, using
>>>>> polyData. And I have an Image. But when working with this, it is not
>>>>> working properly.
>>>>> So I want to convert this image into a polyData, because it is easier
>>>>> to make traversal, comparisons and other things.
>>>>> If you have any ideas I will be very grateful.
>>>>>
>>>>>  Gonzalo
>>>>>
>>>>> 2012/4/27 Li, Wen <wen-li at uiowa.edu>
>>>>>
>>>>>> I am not sure how can you do the converting. are you going to
>>>>>> generate a surface out of it?
>>>>>>
>>>>>> Wen
>>>>>>
>>>>>> On Apr 26, 2012, at 5:53 PM, gonza8888 wrote:
>>>>>>
>>>>>> > Sorry for responsing here. But as long as you are working with
>>>>>> image and
>>>>>> > polydata.
>>>>>> > Do you know how I can convert an image into polydata ( a 3D
>>>>>> triangle mesh) ,
>>>>>> > the image if i am not wrong is an mitk::image.
>>>>>> >
>>>>>> > Thank u for the help! =)
>>>>>> >
>>>>>> > --
>>>>>> > View this message in context:
>>>>>> http://vtk.1045678.n5.nabble.com/Convert-to-binary-image-tp5668642p5668859.html
>>>>>> > Sent from the VTK - Users mailing list archive at Nabble.com.
>>>>>> > _______________________________________________
>>>>>> > Powered by www.kitware.com
>>>>>> >
>>>>>> > Visit other Kitware open-source projects at
>>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>> >
>>>>>> > Please keep messages on-topic and check the VTK FAQ at:
>>>>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>>>> >
>>>>>> > Follow this link to subscribe/unsubscribe:
>>>>>> > http://www.vtk.org/mailman/listinfo/vtkusers
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>  --
>>>>> --------
>>>>> Gonzalo Amadio
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120503/1594831c/attachment.htm>


More information about the vtkusers mailing list