changeset 2676:83e47a70794b master

fixed dependency on missing file, and missing configuration variables
author Vladimir S. FONOV <vladimir.fonov@gmail.com>
date Fri, 20 Apr 2012 12:50:15 -0400
parents 356c5bda3c9d
children
files CMakeLists.txt MINC2Config.cmake.in ezminc/minc_1_simple.h minc4itk/minc_helpers.h
diffstat 4 files changed, 39 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -346,6 +346,7 @@
   ADD_DEPENDENCIES(volume_io ${MINC2_LIBRARY})
 ENDIF(BUILD_MINC2)
 
+
 INSTALL(FILES volume_io/Include/volume_io/alloc.h
 	volume_io/Include/volume_io/arrays.h 
 	volume_io/Include/volume_io/basic.h 
@@ -364,6 +365,13 @@
 	volume_io/Include/volume_io/volume_cache.h
    DESTINATION include/volume_io)
 
+
+SET(VOLUME_IO_LIBRARIES ${VOLUME_IO_LIBRARY} ${MINC2_LIBRARIES})
+
+SET(EZMINC_LIBRARIES )
+SET(MINC4ITK_LIBRARIES )
+
+
 IF(BUILD_TOOLS)
 # now build the progs subdir
   ADD_SUBDIRECTORY( progs )
@@ -376,10 +384,12 @@
 
 IF(BUILD_EZMINC)
   ADD_SUBDIRECTORY( ezminc )
+  SET(EZMINC_LIBRARIES minc_io ${MINC2_LIBRARIES} )
 ENDIF(BUILD_EZMINC)
 
 IF(BUILD_MINC4ITK AND BUILD_EZMINC)
   ADD_SUBDIRECTORY( minc4itk )
+  SET(MINC4ITK_LIBRARIES minc4itk ${EZMINC_LIBRARIES} )
 ENDIF(BUILD_MINC4ITK AND BUILD_EZMINC)
 
 # config for the build directory
@@ -400,6 +410,7 @@
 
 set(MINC2_LIBRARY_DIRS_CONFIG ${CMAKE_CURRENT_BINARY_DIR})
 
+
 configure_file(MINC2Config.cmake.in
   ${CMAKE_CURRENT_BINARY_DIR}/MINC2Config.cmake @ONLY )
 
--- a/MINC2Config.cmake.in
+++ b/MINC2Config.cmake.in
@@ -13,3 +13,8 @@
 set(MINC2_LIBRARY_DIRS "@MINC2_LIBRARY_DIRS_CONFIG@")
 set(MINC2_USE_FILE     "@MINC2_USE_FILE_CONFIG@")
 set(MINC2_LIBRARIES    "@MINC2_LIBRARIES@")
+
+set(EZMINC_LIBRARIES    "@EZMINC_LIBRARIES@")
+set(MINC4ITK_LIBRARIES  "@MINC4ITK_LIBRARIES@")
+set(VOLUME_IO_LIBRARIES "@VOLUME_IO_LIBRARIES@")
+
--- a/ezminc/minc_1_simple.h
+++ b/ezminc/minc_1_simple.h
@@ -254,7 +254,7 @@
     for(in.begin();!in.last();in.next())
     {
       size_t address=0;
-      for(size_t i=0;i<rw.dim_no();i++)
+      for(int i=0;i<rw.dim_no();i++)
         address+=in.cur()[i]*strides[i];
       
       volume[address]=in.value();
@@ -277,7 +277,7 @@
     for(out.begin();!out.last();out.next())
     {
       size_t address=0;
-      for(size_t i=0;i<rw.dim_no();i++)
+      for(int i=0;i<rw.dim_no();i++)
         address+=out.cur()[i]*strides[i];
 
       out.value(volume[address]);
--- a/minc4itk/minc_helpers.h
+++ b/minc4itk/minc_helpers.h
@@ -22,7 +22,6 @@
 
 #include "itkMincImageIOFactory.h"
 #include "itkMincImageIO.h"
-#include <minc_io_fixed_vector.h>
 
 namespace minc
 {
@@ -203,23 +202,23 @@
   //! \param dims - dimensions (voxels)
   //! \param spacing - volume spacing (mm)
   //! \param origin  - volume origin (mm)
-  template<class T> void allocate_image3d(typename T::Pointer &image, 
-      const fixed_vec<3, unsigned int>&dims, 
-      const fixed_vec<3, double>& spacing=fixed_vec<3, double>(1.0) , 
-      const fixed_vec<3, double>& origin=fixed_vec<3, double>(0.0))
-	{
-		image3d_complex::SizeType  imageSize3D = {{ dims[0], dims[1], dims[2]}};
-		image3d_complex::IndexType startIndex3D = { {0, 0, 0}};
-		image3d_complex::RegionType region;
-		region.SetSize  (imageSize3D);
-		region.SetIndex (startIndex3D);
-		image->SetLargestPossibleRegion (region);
-		image->SetBufferedRegion (region);
-		image->SetRequestedRegion (region);
-		image->SetSpacing( spacing.c_buf() );
-		image->SetOrigin( origin.c_buf() );
-		image->Allocate ();
-	}
+//   template<class T> void allocate_image3d(typename T::Pointer &image, 
+//       const fixed_vec<3, unsigned int>&dims, 
+//       const fixed_vec<3, double>& spacing=fixed_vec<3, double>(1.0) , 
+//       const fixed_vec<3, double>& origin=fixed_vec<3, double>(0.0))
+// 	{
+// 		image3d_complex::SizeType  imageSize3D = {{ dims[0], dims[1], dims[2]}};
+// 		image3d_complex::IndexType startIndex3D = { {0, 0, 0}};
+// 		image3d_complex::RegionType region;
+// 		region.SetSize  (imageSize3D);
+// 		region.SetIndex (startIndex3D);
+// 		image->SetLargestPossibleRegion (region);
+// 		image->SetBufferedRegion (region);
+// 		image->SetRequestedRegion (region);
+// 		image->SetSpacing( spacing.c_buf() );
+// 		image->SetOrigin( origin.c_buf() );
+// 		image->Allocate ();
+// 	}
 
   
   inline image3d::SizeType operator/= (image3d::SizeType & s, int d)
@@ -275,10 +274,10 @@
   //! allocate volume with spacing 1mm and origin 0,0,0
   //! \param[out] image - volume to allocate
   //! \param dims - dimensions (voxels)
-  template<class T> void allocate_image3d(typename T::Pointer &image, const itk::Size<3> &dims)
-  {
-    allocate_image3d<T>(image,IDX<unsigned int>(dims[0],dims[1],dims[2]));
-  }
+//   template<class T> void allocate_image3d(typename T::Pointer &image, const itk::Size<3> &dims)
+//   {
+//     allocate_image3d<T>(image,IDX<unsigned int>(dims[0],dims[1],dims[2]));
+//   }
 
   //! calculate volume min and max
   int get_image_limits(image3d::Pointer, voxel_type &min, voxel_type &max);