ITK/Examples/Math/CovariantVector

From KitwarePublic
< ITK‎ | Examples
Revision as of 15:19, 22 October 2010 by Daviddoria (talk | contribs) (Created page with "==CovariantVector.cxx== <source lang="cpp"> #include <itkCovariantVector.h> int main(int, char*[]) { typedef itk::CovariantVector<double, 3> VectorType; VectorType v; v[0]...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

CovariantVector.cxx

<source lang="cpp">

  1. include <itkCovariantVector.h>

int main(int, char*[]) {

 typedef itk::CovariantVector<double, 3> VectorType;
 VectorType v;
 v[0] = 1.0;
 v[1] = 2.0;
 v[2] = 3.0;
 
 std::cout << "v: " << v << std::endl;
 
 return EXIT_SUCCESS;

}

</source>

CMakeLists.txt

<source lang="cmake"> cmake_minimum_required(VERSION 2.6)

PROJECT(CovariantVector)

FIND_PACKAGE(ITK REQUIRED) INCLUDE(${ITK_USE_FILE})

ADD_EXECUTABLE(CovariantVector CovariantVector.cxx) TARGET_LINK_LIBRARIES(CovariantVector ITKCommon) </source>