[Insight-users] using boost with ITK

Mike Jackson mike.jackson at bluequartz.net
Wed Jan 13 12:08:39 EST 2010


Use the find_package(Boost COMPONENTS file_system system) in your own
cmake files.

_________________________________________________________
Mike Jackson                  mike.jackson at bluequartz.net
BlueQuartz Software                    www.bluequartz.net
Principal Software Engineer                  Dayton, Ohio



On Wed, Jan 13, 2010 at 11:51 AM, Mark Roden <mmroden at gmail.com> wrote:
> OK, but does anyone have any ideas on how to do it just in my own
> programs where the sln file is made by cmake?  That's my real goal.
>
> On Wed, Jan 13, 2010 at 8:48 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>> At this point, I don't think we want to add a boost dependency to itk.
>> There is a ongoing i18n effort to address the file system problems.
>>
>> Bill
>>
>> On Wed, Jan 13, 2010 at 11:42 AM, Mark Roden <mmroden at gmail.com> wrote:
>>> Hi all,
>>>
>>> I want to write some of my own programs using the cmake paradigm in
>>> ITK.  I figure I should just do it rather than being a terrible whiner
>>> (see my earlier posts about cmake....)
>>>
>>> So far, I'm putting my programs into the Experimental directory, and
>>> then everything seems to build fine, except for some file system calls
>>> to scan a directory.  I want to combine some of the Insight Journal
>>> articles into a specific pipeline that's run entirely within a C++
>>> program, and that requires interacting with the filesystem (ie,
>>> getting directory listings and the like).  It turns out, Windows has
>>> two ways to do this, depending on whether or not the program was built
>>> in a 64bit platform or a 32bit platform.
>>>
>>> That's not going to fly, because I just want this stuff to work
>>> without having to add a new #define for each operating system I come
>>> across.  So, I want to add boost.filesystem to my little island of ITK
>>> to properly interact with directories across platforms.  That library
>>> has a 'path' object that just works, regardless of OS.
>>>
>>> As a side note, I notice that several of the articles are using char*
>>> for filenames, and that was my problem as well-- win7 64bit apparently
>>> needs wchar_t, not char, so that code needs to be modified to work
>>> properly.  Some of the IO classes (notably GDCMImageIO and
>>> ImageFileWriter) depend on char* rather than wide chars, and I think
>>> that a good step to complete compatibility would be to update that to
>>> use the boost.filesystem.path.  While I realize that that will
>>> probably be quite a bit of work, it would definitely stick within the
>>> mission of being fully cross-platform, and as I understand it,
>>> boost.filesystem will be part of the C++ standard in TR2.
>>>
>>> So how about it?  How do I use boost.filesystem from a cmake-built itk
>>> program placed in the Review directory?
>>>
>>> Thanks,
>>> Mark
>>> _____________________________________
>>> 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.html
>>>
>>> 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
>>>
>>
> _____________________________________
> 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.html
>
> 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 Insight-users mailing list