[ITK-users] Problem with ImageFilterMultipleInputs Wiki Example

DVigneault davis.vigneault at gmail.com
Thu May 15 16:31:16 EDT 2014


All--

I ran into some problems while trying to run t his Wiki example
<http://www.itk.org/Wiki/ITK/Examples/Developer/ImageFilterMultipleInputs  > 
, and had to make the following changes in order to get it to run:

1.  The source file name in the CMakeLists.txt file did not match the actual
.cxx file name.  Changing the .cxx file from " ImageFilterMultipleInput.cxx"
(extraneous space intentional) to "ImageFilterMultipleInputs.cxx" fixed
this.
2.  Building the code created a .app file (I'm on Mac) that unexpectedly
quit upon opening.  Changing my CMakeLists.txt file to the one copied below
fixed this.
3.  Only one input was set, though two were required.  Adding a second
reader and changing the input calls to SetInputImage and SetInputMask fixed
this.
4.  Upon wrapping the update calls in try/catch blocks, I got a "use of
undeclared identifier 'SetNthInput'" error.  Adding this-> before the
SetNthInput calls in the .txx file fixed this.

With these changes, the example is now running as expected.  My questions
are:
--Was I doing something wrong that caused me to encounter these problems?
--If not, should the Wiki example be updated?

Best, and thanks,

--Davis


//////////////////////
// CMakeLists.txt //
//////////////////////

# This is the root ITK CMakeLists file.
cmake_minimum_required(VERSION 2.4)
if(COMMAND CMAKE_POLICY)
  cmake_policy(SET CMP0003 NEW)
endif()

# This project is designed to be built outside the Insight source tree.
project(ImageFilterMultipleInputs)

# Find ITK.
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

add_executable(ImageFilterMultipleInputs ImageFilterMultipleInputs.cxx )

target_link_libraries(ImageFilterMultipleInputs ${ITK_LIBRARIES})



--
View this message in context: http://itk-users.7.n7.nabble.com/Problem-with-ImageFilterMultipleInputs-Wiki-Example-tp33957.html
Sent from the ITK - Users mailing list archive at Nabble.com.


More information about the Insight-users mailing list