[Insight-users] using boost with ITK

Bill Lorensen bill.lorensen at gmail.com
Wed Jan 13 11:48:40 EST 2010


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
>


More information about the Insight-users mailing list