[Insight-users] AddImageFilter problem

Luis Ibanez luis.ibanez at kitware.com
Fri Aug 13 18:25:58 EDT 2004


Hi Peter,

Please look at the following message for instructions
on how to use the AddImageFilter with Vector images.
http://www.itk.org/pipermail/insight-users/2004-August/010061.html


   Regards,


      Luis



-----------------------
Peter BERTOLAZZI wrote:

> 
> I'm trying to use AddImageFilter to add 2 vector images. From the 
> AddImageFilter help I thought it was going to be straight forward <"For 
> example, this filter could be used directly for adding images whose 
> pixels are vectors of the same dimension, and to store the resulting 
> vector in an output image of vector pixels.">but compilation complains 
> of some conversion problems, vnl_matrix....  already when I create the 
> filter...
> 
> typedef itk::Vector<float,3> myvectortype;
> typedef itk::Image<myvectortype, 3> myimagetype;
> 
> myimagetype::Pointer myimage= myimagetype::New();
> typedef itk::AddImageFilter <myimagetype, myimagetype, myimagetype> 
> myaddtype;
> 
> myaddtype::Pointer myadder = myaddtype::New();
> 
> Thanks,
> Peter
> 
> _________________________________________________________________
> Is your PC infected? Get a FREE online computer virus scan from McAfee® 
> Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> 
> ------------------------------------------------------------------------
> 
> Hi all,
>  
> I am trying to build an application based on ITK. There are a few .cxx, 
> .h, .txx files written by myself. I wrote a CMakeLists.txt file and 
> tried to generate a workspace of MS VC 6.0 on a Windows XP machine by 
> using CMakeSetup. But the configuration failed and the error messages 
> said that could not find those .cxx files in the directory that I 
> specified. I am new on writing the CMakeLists.txt file, I attached my 
> "CMakeLists.txt" in the following, could any expert please give me some 
> advice on what I did wrong here?
>  
> Thanks a lot!
>  
> Ying
>  
> PROJECT( MarquardtRegistration )
> INCLUDE_REGULAR_EXPRESSION(".*")
> FIND_PACKAGE(ITK)
> IF(ITK_FOUND)
>   INCLUDE(${ITK_USE_FILE})
> ELSE(ITK_FOUND)
>   MESSAGE(FATAL_ERROR
>           "Cannot build without ITK.  Please set ITK_DIR.")
> ENDIF(ITK_FOUND)
> INCLUDE_DIRECTORIES(
> ${MarquardtRegistration_SOURCE_DIR}
> ${MarquardtRegistration_BINARY_DIR}
> )
> SET(MarquardtRegistration_SRCS
>   MarquardtRegistration.cxx
>   LevenbergMarquardtOptimizer.cxx
>   Numerical_Recipes_util.cxx
> )
> ADD_EXECUTABLE(MarquardtRegistration
>   "${MarquardtRegistration_SRCS}")
> TARGET_LINK_LIBRARIES(MarquardtRegistration ITKNumerics ITKBasicFilters 
> ITKIO)
> 
> ------------------------------------------------------------------------
> Tired of spam? Get advanced junk mail protection 
> <http://g.msn.com/8HMAEN/2734??PS=47575> with MSN 8.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users






More information about the Insight-users mailing list