[Insight-users] easy way to get a file name extension

Darren Weber darren.weber.lists at gmail.com
Mon Oct 12 19:00:22 EDT 2009


On Mon, Oct 12, 2009 at 3:41 PM, Darren Weber
<darren.weber.lists at gmail.com>wrote:

>
>
> On Mon, Oct 12, 2009 at 3:37 PM, Darren Weber <
> darren.weber.lists at gmail.com> wrote:
>
>>
>> Are there any classes or methods for handling file names in ITK?
>>
>> Is it common to use Boost.Filesystem for handling files in an ITK project?
>> http://www.boost.org/doc/libs/1_40_0/libs/filesystem/doc/index.htm
>>
>> The main problem before me is to extract and change a file extension, like
>> substitute .tif to .xfm, and to output a spatial transform into the .xfm
>> file with the same path and filename as the .tif file.  (The actual file
>> extension may be any image file type, not specifically .tif).
>>
>> Thanks,
>> Darren
>>
>>
> P.S.,  If the Boost.Filesystem lib is used, how is it included in
> CMakeLists.txt?
>
>
P.P.S.  This is informative:

cmake --help-module FindBoost


eg:

FIND_PACKAGE(Boost 1.40 COMPONENTS filesystem system)
IF(Boost_FOUND)
    INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
    LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})

    ADD_EXECUTABLE(itkImageAffineCoregistration
itkImageAffineCoregistration.cxx)
    TARGET_LINK_LIBRARIES(itkImageAffineCoregistration ITKIO
ITKNumerics ${Boost_LIBRARIES})
ENDIF()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091012/282e646d/attachment.htm>


More information about the Insight-users mailing list