[ITK Community] [Insight-users] SpatialObject IO

Luis Ibanez luis.ibanez at kitware.com
Mon Jan 27 14:53:00 EST 2014


Hi Luke,

Yes, I see your point.

What comes to mind is to write a specialized Writer class that could
take as input a GroupSpatialObject, and inspect it for the presence
of itkLineSpatialObjects, then proceed to write them out as .vtk files.

It wouldn't fit initially into the IO Spatial framework (since that
addresses
a much more generic case), but would allow you to address the
immediate issue at hand.

It could also be later transformed into a writer of GCode files,
and in this way provide dual use for supporting basic 3D printing   ;-)

Please let us know if you would like to take a cut at writing such class,
maybe a:

                 itkGroupSpatialObjectVTKPolyLineWriter

we will be happy to assist you in the process.


    Thanks


           Luis




On Thu, Jan 23, 2014 at 1:11 PM, Luke Bloy <luke.bloy at gmail.com> wrote:

> Hi Luis,
>
> Thanks for the response.
>
> So what you proposed is done. At least a method for converting
> LineSpatialObjects to vtkPolyLines has been written. but I make use of vtk
> objects and writers, so while it solves my problem I don't see an easy way
> to fit it into ITK? At least at the IO level, which is where it would be
> useful. A possible work around would be to add a class to vtkGlue that
> would convert a SpatialObject to a vtkPolydata? That being said maybe there
> isn't a lot of need for spatialObject to vtk compatibility?
>
> -Luke
>
>
>
>
> On Thu, Jan 23, 2014 at 9:10 AM, Luis Ibanez <luis.ibanez at kitware.com>wrote:
>
>> Hi Luke
>>
>>
>> On Mon, Jan 20, 2014 at 3:25 PM, Luke Bloy <luke.bloy at gmail.com> wrote:
>>
>>>
>>> I'm not sure how miserable it would be to have the SpatialObjectWriter
>>> support vtk output? It seems like that would be an ideal situation if it
>>> were possible.
>>>
>>>
>>>
>> I agree with you.
>> It will certainly be very useful.
>>
>> I would guess that writing a couple of special cases will be relatively
>> easy,
>> and that writing the generic case (that can manage any SpatialObject)
>> will be an interesting challenge.
>>
>> So, following the agile philosophy, it sounds like a good idea to write
>> the
>> special case for writing out the LineSpatialObject (which should be
>> relatively
>> simple), and then later grow from there.
>>
>> This will also take care of the current itch   :-)
>>
>> If you would like to give it a try at writing that initial class,
>> we will be happy to assist you.
>>
>>
>>      HTH
>>
>>
>>            Luis
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140127/8c00515d/attachment-0002.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users


More information about the Community mailing list