[Insight-users] registration: final transform applied to RGB images

Darren Weber darren.weber.lists at gmail.com
Tue Sep 29 22:12:44 EDT 2009


Please find attached a src file to calculate a registration (based on scalar
image data).  The final transform should be applied to RGB images.  Example
data files are available here:

ftp://ftp.buckinstitute.org/dweber/itkRegistrationFiles.tar.gz

The program can be called using this example data as:
$HOME/bin/itkImageCoregistration \
./w1/bw/section0178_w1.tif \
./w1/bw/section0179_w1.tif \
./w1/bw_align/section0179to0178_w1.tif \
./w1/tif/section0178_w1.tif \
./w1/tif/section0179_w1.tif \
./w1/tif_align/section0179to0178_w1.tif \
./w1/bw_align/section0179to0178_w1_DiffBefore.tif \
./w1/bw_align/section0179to0178_w1_DiffAfter.tif

The src builds when lines 474-488 are commented out, but otherwise
resampling the RGB data fails in compile-time errors (ITK 3.14), i.e.:

[100%] Building CXX object
CMakeFiles/itkImageCoregistration.dir/itkImageCoregistration.o
/opt/local/include/InsightToolkit-3.14/Common/itkConceptChecking.h: In
member function ‘void
itk::Concept::HasNumericTraits<T>::Constraints::constraints() [with T =
main(int, char**)::rgbPixelType]’:
/opt/local/include/InsightToolkit-3.14/Common/itkConceptChecking.h:580:
instantiated from ‘itk::Concept::HasNumericTraits<main(int,
char**)::rgbPixelType>’
/opt/local/include/InsightToolkit-3.14/BasicFilters/itkResampleImageFilter.h:252:
instantiated from ‘itk::ResampleImageFilter<main(int, char**)::rgbImageType,
main(int, char**)::rgbImageType, double>’
/Users/dweber/src/kitware/itkImageCoregistration/itkImageCoregistration.cxx:475:
instantiated from here
/opt/local/include/InsightToolkit-3.14/Common/itkConceptChecking.h:571:
error: ‘IsPositive’ is not a member of ‘itk::NumericTraits<main(int,
char**)::rgbPixelType>’
/opt/local/include/InsightToolkit-3.14/Common/itkConceptChecking.h:572:
error: ‘IsNonpositive’ is not a member of ‘itk::NumericTraits<main(int,
char**)::rgbPixelType>’
/opt/local/include/InsightToolkit-3.14/Common/itkConceptChecking.h:573:
error: ‘IsNegative’ is not a member of ‘itk::NumericTraits<main(int,
char**)::rgbPixelType>’
/opt/local/include/InsightToolkit-3.14/Common/itkConceptChecking.h:574:
error: ‘IsNonnegative’ is not a member of ‘itk::NumericTraits<main(int,
char**)::rgbPixelType>’
/opt/local/include/InsightToolkit-3.14/BasicFilters/itkResampleImageFilter.txx:
In member function ‘void itk::ResampleImageFilter<TInputImage, TOutputImage,
TInterpolatorPrecisionType>::NonlinearThreadedGenerateData(const typename
TOutputImage::RegionType&, int) [with TInputImage = main(int,
char**)::rgbImageType, TOutputImage = main(int, char**)::rgbImageType,
TInterpolatorPrecisionType = double]’:
/opt/local/include/InsightToolkit-3.14/BasicFilters/itkResampleImageFilter.txx:183:
instantiated from ‘void itk::ResampleImageFilter<TInputImage, TOutputImage,
TInterpolatorPrecisionType>::ThreadedGenerateData(const typename
TOutputImage::RegionType&, int) [with TInputImage = main(int,
char**)::rgbImageType, TOutputImage = main(int, char**)::rgbImageType,
TInterpolatorPrecisionType = double]’
/Users/dweber/src/kitware/itkImageCoregistration/itkImageCoregistration.cxx:542:
instantiated from here
/opt/local/include/InsightToolkit-3.14/BasicFilters/itkResampleImageFilter.txx:288:
error: no match for ‘operator>’ in ‘value > maxOutputValue’
/opt/local/include/InsightToolkit-3.14/BasicFilters/itkResampleImageFilter.txx:
In member function ‘void itk::ResampleImageFilter<TInputImage, TOutputImage,
TInterpolatorPrecisionType>::LinearThreadedGenerateData(const typename
TOutputImage::RegionType&, int) [with TInputImage = main(int,
char**)::rgbImageType, TOutputImage = main(int, char**)::rgbImageType,
TInterpolatorPrecisionType = double]’:
/opt/local/include/InsightToolkit-3.14/BasicFilters/itkResampleImageFilter.txx:192:
instantiated from ‘void itk::ResampleImageFilter<TInputImage, TOutputImage,
TInterpolatorPrecisionType>::ThreadedGenerateData(const typename
TOutputImage::RegionType&, int) [with TInputImage = main(int,
char**)::rgbImageType, TOutputImage = main(int, char**)::rgbImageType,
TInterpolatorPrecisionType = double]’
/Users/dweber/src/kitware/itkImageCoregistration/itkImageCoregistration.cxx:542:
instantiated from here
/opt/local/include/InsightToolkit-3.14/BasicFilters/itkResampleImageFilter.txx:467:
error: no match for ‘operator>’ in ‘value > maxOutputValue’
gmake[2]: ***
[CMakeFiles/itkImageCoregistration.dir/itkImageCoregistration.o] Error 1
gmake[1]: *** [CMakeFiles/itkImageCoregistration.dir/all] Error 2
gmake: *** [all] Error 2



Many TIA,
Darren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090929/1d271f7d/attachment-0001.htm>
-------------- next part --------------
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
IF(COMMAND CMAKE_POLICY)
  CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)

PROJECT(itkImageCoregistration)
#INCLUDE_REGULAR_EXPRESSION("^.*$")

# Find ITK.
#SET (ITK_DIR /opt/local/lib/InsightToolkit-3.14)
#FIND_PACKAGE(ITK-3.14 REQUIRED)
FIND_PACKAGE(ITK REQUIRED)
INCLUDE(${ITK_USE_FILE})

ADD_EXECUTABLE(itkImageCoregistration itkImageCoregistration.cxx )
TARGET_LINK_LIBRARIES(itkImageCoregistration ITKIO ITKNumerics)

#ADD_EXECUTABLE(ImageRegistration11 ImageRegistration11.cxx )
#TARGET_LINK_LIBRARIES(ImageRegistration11 ITKStatistics ITKIO ITKNumerics)

#ADD_EXECUTABLE(MultiResImageRegistration1 MultiResImageRegistration1.cxx )
#TARGET_LINK_LIBRARIES(MultiResImageRegistration1 ITKIO ITKNumerics)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: itkImageCoregistration.cxx
Type: application/octet-stream
Size: 23010 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090929/1d271f7d/attachment-0001.obj>


More information about the Insight-users mailing list