[prev in list] [next in list] [prev in thread] [next in thread]
List: insight-users
Subject: Re: [ITK-users] Problems integrating itk in own project
From: Francois Budin <francois.budin () kitware ! com>
Date: 2017-03-27 13:18:52
Message-ID: CAHwLD2UrcAcxcA5iJb_Vi5EeL+3_ewxJuL8eOfwdx0kmwR9KTQ () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hello Wolfgang,
Glad you figured out your issue. If that is an option for your project, it
might be a good idea to update ITK to the newest version (4.11) as 3.20 is
a very old version and many things have been improved since that version.
Francois
On Mon, Mar 27, 2017 at 4:18 AM, Wolfgang Aichinger <
aichinger_wolfgang@web.de> wrote:
> Hi again,
>
> I got the itk sources along with the project code and it seems that a bug
> was included. Getting a fresh version (3.20 as it was originally intended=
)
> did the job. Everything works fine now.
>
> Thank you for getting me to the idea.
>
> Best,
> Wolfgang
>
> *Gesendet:* Montag, 27. M=C3=A4rz 2017 um 09:15 Uhr
> *Von:* "Wolfgang Aichinger" <aichinger_wolfgang@web.de>
> *An:* "Christina Rossmanith" <ChrRossmanith@gmx.de>
> *Cc:* insight-users@itk.org
> *Betreff:* Re: [ITK-users] Problems integrating itk in own project
> Hi Christina,
>
> Simply replacing "cxx" by "hxx" did not work for me. I do not even have a
> corresponding ".hxx" file. Are you sure I should have one? Maybe I have t=
o
> download all files again from the website.
> It also seems to be a more general problem, as removing the line with the
> include only leads to similar errors in "itkLinearInterpolateFunction" an=
d
> "itkresamplefilter". Removing all problematic includes of course results =
in
> linker errors (LNK2019).
>
> Regards,
> Wolfgang
>
> *Gesendet:* Montag, 27. M=C3=A4rz 2017 um 08:05 Uhr
> *Von:* "Christina Rossmanith" <ChrRossmanith@gmx.de>
> *An:* "Wolfgang Aichinger" <aichinger_wolfgang@web.de>
> *Cc:* insight-users@itk.org
> *Betreff:* Aw: [ITK-users] Problems integrating itk in own project
> Hi Wolfgang,
>
> as far as I can see itkMattesMutualInformationImageToImageMetric.hxx is
> included in itkMattesMutualInformationImageToImageMetric.h, not .cxx
> You should include .h in your source file not .hxx, maybe the examples
> referenced in the documentation [1]
> <https://itk.org/Doxygen/html/classitk_1_1MattesMutualInformationImageToI=
mageMetric.html#a871ef33754a0a0d373a3e76ff78c7189>
> can help you.
>
> Regards,
> Christina
>
>
> *Gesendet:* Montag, 27. M=C3=A4rz 2017 um 07:18 Uhr
> *Von:* "Wolfgang Aichinger" <aichinger_wolfgang@web.de>
> *An:* insight-users@itk.org
> *Betreff:* [ITK-users] Problems integrating itk in own project
> Hi all,
>
> I'm new to itk and to be honest also to using external libraries, so
> excuse me if my question is dumb . I have problems with using ITK 3.20 in=
a
> project on Windows using VS2010. I built ITK using cmake (no examples, no
> tests, with shared libs). With this configuration I was able to compile
> successfully and to install.
> For my project I also have a cmakeLists.txt (below) and was able to
> include all headers. Anyways, I get an error:
>
> Error 1 error C1083: Cannot open include file: '
> itkMattesMutualInformationImageToImageMetric.cxx': No such file or
> directory D:\extern\ITK\include\InsightToolkit\
> itkMattesMutualInformationImageToImageMetric.h 516
>
> This file is in the original sources but not copied during installation.
> Should this be the case? What flag in cmake would enforce this?
> This include is surrounded by an #infdef ITK_MANUAL_INSTANTIATION, which
> is obviously not defined. Could the error be here?
> In the project the path where all itk libraries are installed is set
> correctly to "Additional Library Directories" :
>
> D:/extern/ITK/lib/InsightToolkit
> D:/extern/ITK/lib/InsightToolkit/$(Configuration)
>
> I'm probably missing a step that solves it all but I don't have an
> idea right now.
>
> Thanks for any help!
>
> Best,
> Wolfgang
>
> #CMakeLists.txt
> PROJECT (RigidRegistration)
> SET(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "D:/extern/ITK/lib/
> InsightToolkit")
> find_package(ITK)
> IF(ITK_USE_FILE)
> INCLUDE(${ITK_USE_FILE})
> MESSAGE( STATUS "ITK_USE_FILE: " ${ITK_USE_FILE})
> ENDIF(ITK_USE_FILE)
>
> SET(RigidRegistration
> rigid_registration_of_multimodal_MR_knee_data.cxx
> )
> ADD_EXECUTABLE(RigidRegistration ${RigidRegistration})
>
> TARGET_LINK_LIBRARIES(RigidRegistration
> ${ITK_LIBRARIES}
> )
>
> _____________________________________ 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://public.kitware.com/
> 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.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://public.kitware.com/
> 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.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://public.kitware.com/mailman/listinfo/insight-users
>
>
[Attachment #5 (text/html)]
<div dir="ltr"><div><div>Hello Wolfgang,<br><br></div>Glad you figured out your \
issue. If that is an option for your project, it might be a good idea to update ITK \
to the newest version (4.11) as 3.20 is a very old version and many things have been \
improved since that version.<br><br></div>Francois<br></div><div \
class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 27, 2017 at 4:18 AM, \
Wolfgang Aichinger <span dir="ltr"><<a href="mailto:aichinger_wolfgang@web.de" \
target="_blank">aichinger_wolfgang@web.de</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div><div style="font-family:Verdana;font-size:12.0px"><div> \
<div>Hi again,</div>
<div> </div>
<div>I got the itk sources along with the project code and it seems that a bug was \
included. Getting a fresh version (3.20 as it was originally intended) did the job. \
Everything works fine now.</div>
<div> </div>
<div>Thank you for getting me to the idea.</div>
<div> </div>
<div>Best,</div>
<div>Wolfgang</div>
<div>
<div name="quote" style="margin:10px 5px 5px 10px;padding:10px 0px 10px \
10px;border-left-color:rgb(195,217,229);border-left-width:2px;border-left-style:solid">
<div style="margin:0px 0px 10px"><b>Gesendet:</b> Montag, 27. März 2017 um 09:15 \
Uhr<br> <b>Von:</b> "Wolfgang Aichinger" <<a \
href="mailto:aichinger_wolfgang@web.de" \
target="_blank">aichinger_wolfgang@web.de</a>><br> <b>An:</b> "Christina \
Rossmanith" <<a href="mailto:ChrRossmanith@gmx.de" \
target="_blank">ChrRossmanith@gmx.de</a>><br> <b>Cc:</b> <a \
href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a><br> \
<b>Betreff:</b> Re: [ITK-users] Problems integrating itk in own \
project</div><div><div class="h5">
<div name="quoted-content">
<div style="font-family:Verdana;font-size:12px">
<div>
<div>Hi Christina,</div>
<div> </div>
<div>Simply replacing "cxx" by "hxx" did not work for me. I do \
not even have a corresponding ".hxx" file. Are you sure I should have one? \
Maybe I have to download all files again from the website.</div>
<div>It also seems to be a more general problem, as removing the line with the \
include only leads to similar errors in "itkLinearInterpolateFunction" \
and "itkresamplefilter". Removing all problematic includes of course \
results in linker errors (LNK2019).</div>
<div> </div>
<div>Regards,</div>
<div>Wolfgang </div>
<div>
<div style="margin:10px 5px 5px 10px;padding:10px 0px 10px \
10px;border-left-color:rgb(195,217,229);border-left-width:2px;border-left-style:solid">
<div style="margin:0px 0px 10px"><b>Gesendet:</b> Montag, 27. März 2017 um 08:05 \
Uhr<br> <b>Von:</b> "Christina Rossmanith" <<a \
href="mailto:ChrRossmanith@gmx.de" target="_blank">ChrRossmanith@gmx.de</a>><br> \
<b>An:</b> "Wolfgang Aichinger" <<a \
href="mailto:aichinger_wolfgang@web.de" \
target="_blank">aichinger_wolfgang@web.de</a>><br> <b>Cc:</b> <a \
href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a><br> \
<b>Betreff:</b> Aw: [ITK-users] Problems integrating itk in own project</div>
<div>
<div style="font-family:Verdana;font-size:12px">
<div>Hi Wolfgang,</div>
<div> </div>
<div>as far as I can see itkMattesMutualInformationImag<wbr>eToImageMetric.hxx is \
included in itkMattesMutualInformationImag<wbr>eToImageMetric.h, not .cxx You \
should include .h in your source file not .hxx, maybe the examples referenced in the \
documentation <a href="https://itk.org/Doxygen/html/classitk_1_1MattesMutualInformationImageToImageMetric.html#a871ef33754a0a0d373a3e76ff78c7189" \
target="_blank">[1]</a> can help you.</div>
<div> </div>
<div>Regards,</div>
<div class="m_2847741670956641146signature">Christina</div>
<div>
<div>
<div style="margin:10px 5px 5px 10px;padding:10px 0px 10px \
10px;border-left-color:rgb(195,217,229);border-left-width:2px;border-left-style:solid">
<div style="margin:0px 0px 10px"><b>Gesendet:</b> Montag, 27. März 2017 um 07:18 \
Uhr<br> <b>Von:</b> "Wolfgang Aichinger" <<a \
href="mailto:aichinger_wolfgang@web.de" \
target="_blank">aichinger_wolfgang@web.de</a>><br> <b>An:</b> <a \
href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a><br> \
<b>Betreff:</b> [ITK-users] Problems integrating itk in own project</div>
<div>
<div style="font-family:Verdana;font-size:12px">
<div>
<div>Hi all,</div>
<div> </div>
<div>I'm new to itk and to be honest also to using external libraries, so excuse \
me if my question is dumb . I have problems with using ITK 3.20 in a project on \
Windows using VS2010. I built ITK using cmake (no examples, no tests, with shared \
libs). With this configuration I was able to compile successfully and to \
install.</div>
<div>For my project I also have a cmakeLists.txt (below) and was able to include \
all headers. Anyways, I get an error:</div>
<div> </div>
<div>Error 1 error C1083: Cannot open include file: \
'<wbr>itkMattesMutualInformationImag<wbr>eToImageMetric.cxx': No such file or \
directory D:\extern\ITK\<wbr>include\InsightToolkit\<wbr>itkMattesMutualInformationImag<wbr>eToImageMetric.h \
516<br> </div>
<div>This file is in the original sources but not copied during installation. Should \
this be the case? What flag in cmake would enforce this?</div>
<div>This include is surrounded by an #infdef ITK_MANUAL_INSTANTIATION, which is \
obviously not defined. Could the error be here?</div>
<div>In the project the path where all itk libraries are installed is set correctly \
to "Additional Library Directories" :</div>
<div> </div>
<div>D:/extern/ITK/lib/<wbr>InsightToolkit</div>
<div>D:/extern/ITK/lib/<wbr>InsightToolkit/$(<wbr>Configuration)</div>
<div> </div>
<div>I'm probably missing a step that solves it all but I don't have an idea \
right now.</div>
<div> </div>
<div>Thanks for any help!</div>
<div> </div>
<div>Best,</div>
<div>Wolfgang</div>
<div> </div>
<div>#CMakeLists.txt</div>
<div>
<div>PROJECT (RigidRegistration)<br>
SET(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} \
"D:/extern/ITK/lib/<wbr>InsightToolkit")<br> find_package(ITK)<br>
IF(ITK_USE_FILE)<br>
INCLUDE(${ITK_USE_FILE})<br>
MESSAGE( STATUS "ITK_USE_FILE: " ${ITK_USE_FILE})<br>
ENDIF(ITK_USE_FILE)</div>
<div> </div>
<div>SET(RigidRegistration<br>
rigid_registration_of_<wbr>multimodal_MR_knee_data.cxx<br>
)</div>
<div>ADD_EXECUTABLE(<wbr>RigidRegistration ${RigidRegistration})<br>
<br>
TARGET_LINK_LIBRARIES(<wbr>RigidRegistration<br>
${ITK_LIBRARIES}<br>
)</div>
<div> </div>
</div>
</div>
</div>
______________________________<wbr>_______ Powered by <a \
href="http://www.kitware.com" target="_blank">www.kitware.com</a> Visit other Kitware \
open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" \
target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a> Kitware \
offers ITK Training Courses, for more information visit: <a \
href="http://www.kitware.com/products/protraining.php" \
target="_blank">http://www.kitware.com/<wbr>products/protraining.php</a> Please keep \
messages on-topic and check the ITK FAQ at: <a href="http://www.itk.org/Wiki/ITK_FAQ" \
target="_blank">http://www.itk.org/Wiki/ITK_<wbr>FAQ</a> Follow this link to \
subscribe/unsubscribe: <a \
href="http://public.kitware.com/mailman/listinfo/insight-users" \
target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/insight-users</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
______________________________<wbr>_______ Powered by <a \
href="http://www.kitware.com" target="_blank">www.kitware.com</a> Visit other Kitware \
open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" \
target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a> Kitware \
offers ITK Training Courses, for more information visit: <a \
href="http://www.kitware.com/products/protraining.php" \
target="_blank">http://www.kitware.com/<wbr>products/protraining.php</a> Please keep \
messages on-topic and check the ITK FAQ at: <a href="http://www.itk.org/Wiki/ITK_FAQ" \
target="_blank">http://www.itk.org/Wiki/ITK_<wbr>FAQ</a> Follow this link to \
subscribe/unsubscribe: <a \
href="http://public.kitware.com/mailman/listinfo/insight-users" \
target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/insight-users</a></div>
</div></div></div>
</div>
</div></div></div>
<br>______________________________<wbr>_______<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" \
target="_blank">www.kitware.com</a><br> <br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" \
target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br> <br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" \
target="_blank">http://www.kitware.com/<wbr>products/protraining.php</a><br> <br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" \
target="_blank">http://www.itk.org/Wiki/ITK_<wbr>FAQ</a><br> <br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" \
target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/insight-users</a><br> \
<br></blockquote></div><br></div>
_____________________________________
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://public.kitware.com/mailman/listinfo/insight-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic