Kent,
This is not an issue with directly using a ITK, it's an issue with using
project which use ITK. That is it's a problem using SimpleITK. Digging a little
further I see the following in SimpleITKTargets.cmake:
# Import target "SimpleITKCommon" for configuration "Release"
SET_PROPERTY(TARGET SimpleITKCommon APPEND PROPERTY IMPORTED_CONFIGURATIONS
RELEASE)
SET_TARGET_PROPERTIES(SimpleITKCommon PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "itksys;
...dcmdata;dcmimage;dcmimgle;dcmjpeg;dcmjpls;dcmnet;dcmpstat;dcmqrdb;dcmsr;dcmtls;ijg12;ijg16;ijg8;oflog;ofstd;ITKDICOMParser;.."
IMPORTED_LOCATION_RELEASE
"/home/blowekamp/build/SimpleITK/SimpleITK-build/lib/libSimpleITKCommon-0.6.a"
)
I can't figure out how projects that use SimpleITK, can figure out the path to
ITK libraries, but not the DCMTK ones...
Hrmm... I am now seeing the following in SimpleITKConfig.cmake:
# Find the ITKTargets.cmake file (fallback code that needs to stay here only
# temporarily - eventually ITK will export this value and this chunk can
# disappear...)
set(ITK_CONFIG_TARGETS_FILE
"/home/blowekamp/build/SimpleITK/ITK-prefix/lib/cmake/ITK-4.3/ITKTargets.cmake")
if(NOT ITK_CONFIG_TARGETS_FILE)
if(EXISTS
"/home/blowekamp/build/SimpleITK/ITK-prefix/lib/cmake/ITK-4.3/ITKTargets.cmake")
set(ITK_CONFIG_TARGETS_FILE
"/home/blowekamp/build/SimpleITK/ITK-prefix/lib/cmake/ITK-4.3/ITKTargets.cmake")
endif()
endif()
I don't see the DCTK libraries in ITKTargets.cmake perhaps thats the problem?
I am not really sure what is suppose to be happening with all these cmake files.
It would have been easiest to just disable DCMTK... But I guess these issues
need to get address sooner rather than later now.
Brad
On Nov 29, 2012, at 2:36 PM, "Williams, Norman K" <[email protected]>
wrote:
> You say "Please note that SimpleITK is a little weird on how it uses ITK."
>
> This 'weird' sounds as though it is the problem. What I used to test an
> ITK install (and also setting ITK_DIR to ITK-build, i.e.
> using a build tree) is below. This arrangement works. The ${ITK_USE_FILE}
>
> --------------------CMakeLists.txt
> cmake_minimum_required(VERSION 2.8)
> project(tst)
>
> find_package(ITK REQUIRED)
> include(${ITK_USE_FILE})
>
> add_executable(tst tst.cxx)target_link_libraries(tst ${ITK_LIBRARIES})
>
> -------------------------tst.cxx
> #include <itkImage.h>
> #include <itkDCMTKImageIO.h>
>
>
> int main(int argc, char *argv[]){
> itk::DataObject::Pointer ptr = A();
> itk::DCMTKImageIO::Pointer imageio = itk::DCMTKImageIO::New();
> exit(0);
> }
>
>
>
>
> --
> Kent Williams [email protected]
>
>
>
>
>
>
> On 11/29/12 8:29 AM, "Bradley Lowekamp" <[email protected]> wrote:
>
>> Hello,
>>
>> I have narrowed down SimpleITK's issue[1] with building against that
>> latest ITK with DCMTK to the following. After "find_package(ITK
>> REQUIRED)" the following is defined:
>>
>> ITK_LIBRARY_DIRS:
>> ITK_INCLUDE_DIRS:
>> /home/blowekamp/build/SimpleITK/ITK-prefix/include/ITK-4.3
>>
>> But the libraries used on the command line are the following:
>>
>> -ldcmdata -ldcmimage -ldcmimgle -ldcmjpeg -ldcmjpls -ldcmnet -ldcmpstat
>> -ldcmqrdb -ldcmsr -ldcmtls -lijg12 -lijg16 -lijg8 -loflog -lofstd
>>
>> Hence they are not found.
>>
>> That is they are relative, not absolute like the other ITK libraries. So
>> some how these either need to be changed to be absolute or the
>> ITK_LIBRARIES_DIRS, needs to be updated to include the installed path.
>>
>> Please note that SimpleITK is a little weird on how it uses ITK. It does
>> not right away "include ( ${ITK_USE_FILE} )". And when the project is
>> installed an includes it also does not include the ITK use file, it only
>> export the LIBRARY_DIR path. This is because when you use SimpleITK from
>> the C++ interface is does not expose any ITK headers, so it nicely
>> encapsulated.
>>
>> Thanks,
>> Brad
>>
>> [1] http://open.cdash.org/viewBuildError.php?buildid=2688206
>>
>> _______________________________________________
>> 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://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-developers
>
>
>
> ________________________________
> Notice: This UI Health Care e-mail (including attachments) is covered by the
> Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential
> and may be legally privileged. If you are not the intended recipient, you
> are hereby notified that any retention, dissemination, distribution, or
> copying of this communication is strictly prohibited. Please reply to the
> sender that you have received the message in error, then delete it. Thank
> you.
> ________________________________
_______________________________________________
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://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-developers