[Insight-users] Subsampling an Image
Luis Ibanez
luis.ibanez at kitware.com
Tue Feb 24 09:33:17 EST 2009
Hi Ted,
The difference between "Supersampling" and "Subsampling"
become irrelevant when you use the itkResampleImageFilter.
All that matters is defining the spacing of the output image
correctly.
Please read the ITK Software Guide
http://www.itk.org/ItkSoftwareGuide.pdf
in particular, section 6.9.4 "Resample Image Filter"
in pdf-pages 254-284.
If you are interested in "sub-sampling" which, again,
is simply "Resampling" with an output spacing that is
larger than the input spacing... then, please look at
the file
Insight/Examples/Filtering/
SubsampleVolume.cxx
Regards,
Luis
----------------
Mr Spit wrote:
> Thank you Luis It helped but what about resampling down?
>
> Ted
> Wiadomość napisana w dniu 2009-02-24, o godz. 14:03, przez Luis Ibanez:
>
>> Hi Ted,
>>
>> You are missing to link to the ITKNumerics library.
>>
>> In your CMakeLists.txt file, go to the command
>>
>> TARGET_LINK_LIBRARIES()
>>
>> and add "ITKNumerics" to the list.
>>
>> The simple way of figuring this out is the following:
>>
>> Your error message says that the linker is not finding
>> the symbol:
>>
>> itk::SingleValuedNonLinearOptimizer
>>
>> if you grep the ITK tree for "SingleValuedNonLinearOptimizer"
>> you will find entries in the directory
>>
>> Insight/Code/Numerics
>>
>> which will give you the hint that the classes in question
>> will be part of the "ITKNumerics" library.
>>
>> ITK creates a library for each one of the subdirectories
>> of "Insight/Code".
>>
>>
>> Regards,
>>
>>
>> Luis
>>
>>
>> -----------------------------------------------------------------------
>> On Tue, Feb 24, 2009 at 4:32 AM, Mr Spit <mrspit08 at gmail.com
>> <mailto:mrspit08 at gmail.com>> wrote:
>>
>> Hi,
>> I'm just starting with ITK and I have problems with compiling this
>> example(error below). Moreover I was ask to do registration of an
>> DTI image on a Anatomic Image. Could you suggest on what example
>> should I base what would be useful?
>>
>> All ready thank you for help.
>> TeDe
>>
>> ===============================================================================================
>> "vtable for itk::SingleValuedNonLinearOptimizer", referenced from:
>> __ZTVN3itk30SingleValuedNonLinearOptimizerE$non_lazy_ptr in
>> ImageRegistration8.cxx.o
>> "vtable for itk::Optimizer", referenced from:
>> __ZTVN3itk9OptimizerE$non_lazy_ptr in ImageRegistration8.cxx.o
>> "itk::Optimizer::Optimizer()", referenced from:
>> itk::NonLinearOptimizer::NonLinearOptimizer()in
>> ImageRegistration8.cxx.o
>> "vtable for itk::CostFunction", referenced from:
>> __ZTVN3itk12CostFunctionE$non_lazy_ptr in
>> ImageRegistration8.cxx.o
>> "typeinfo for itk::CostFunction", referenced from:
>> typeinfo for itk::SingleValuedCostFunctionin
>> ImageRegistration8.cxx.o
>> "itk::Optimizer::PrintSelf(std::basic_ostream<char,
>> std::char_traits<char> >&, itk::Indent) const", referenced from:
>> vtable for itk::NonLinearOptimizerin ImageRegistration8.cxx.o
>> "typeinfo for itk::Optimizer", referenced from:
>> typeinfo for itk::NonLinearOptimizerin ImageRegistration8.cxx.o
>> "vtable for itk::VersorRigid3DTransformOptimizer", referenced from:
>> __ZTVN3itk31VersorRigid3DTransformOptimizerE$non_lazy_ptr in
>> ImageRegistration8.cxx.o
>> "itk::CostFunction::PrintSelf(std::basic_ostream<char,
>> std::char_traits<char> >&, itk::Indent) const", referenced from:
>> vtable for itk::SingleValuedCostFunctionin
>> ImageRegistration8.cxx.o
>> itk::ImageToImageMetric<itk::Image<float, 3u>,
>> itk::Image<float, 3u> >::PrintSelf(std::basic_ostream<char,
>> std::char_traits<char> >&, itk::Indent) constin
>> ImageRegistration8.cxx.o
>> "itk::Optimizer::SetInitialPosition(itk::Array<double> const&)",
>> referenced from:
>> vtable for itk::NonLinearOptimizerin ImageRegistration8.cxx.o
>> "itk::RegularStepGradientDescentBaseOptimizer::RegularStepGradientDescentBaseOptimizer()",
>> referenced from:
>>
>> itk::VersorRigid3DTransformOptimizer::VersorRigid3DTransformOptimizer()in
>> ImageRegistration8.cxx.o
>> "vtable for itk::RegularStepGradientDescentBaseOptimizer",
>> referenced from:
>>
>> __ZTVN3itk39RegularStepGradientDescentBaseOptimizerE$non_lazy_ptr
>> in ImageRegistration8.cxx.o
>> "itk::Optimizer::SetScales(itk::Array<double> const&)",
>> referenced from:
>> _main in ImageRegistration8.cxx.o
>> "itk::Optimizer::SetCurrentPosition(itk::Array<double> const&)",
>> referenced from:
>> vtable for itk::NonLinearOptimizerin ImageRegistration8.cxx.o
>> "typeinfo for itk::VersorRigid3DTransformOptimizer", referenced from:
>> __ZTIN3itk31VersorRigid3DTransformOptimizerE$non_lazy_ptr in
>> ImageRegistration8.cxx.o
>> ld: symbol(s) not found
>> collect2: ld returned 1 exit status
>> make[2]: *** [ImportData] Error 1
>> make[1]: *** [CMakeFiles/ImportData.dir/all] Error 2
>> make: *** [all] Error 2
>> dhcp-8-25-188:Temp tedix86$
>>
>> _____________________________________
>> Powered by www.kitware.com <http://www.kitware.com>
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> 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-users
>>
>>
>
More information about the Insight-users
mailing list