Commit 2ed641f01d656123c7685fb353d6c754ed81fde4

Authored by David Mayerich
1 parent 369fcea9

removed the dependence on image.h from stim::envi. The CImg library used as part…

… of stim::image was causing a problem with Qt.
Showing 2 changed files with 14 additions and 4 deletions   Show diff stats
  1 +#ifndef STIM_CUDA_TIMER
  2 +#define STIM_CUDA_TIMER
  3 +
1 static cudaEvent_t tStartEvent; 4 static cudaEvent_t tStartEvent;
2 static cudaEvent_t tStopEvent; 5 static cudaEvent_t tStopEvent;
3 6
  7 +namespace stim{
  8 +
  9 +/// These functions calculate the time between GPU functions in milliseconds
4 static void gpuStartTimer() 10 static void gpuStartTimer()
5 { 11 {
6 //set up timing events 12 //set up timing events
@@ -18,4 +24,8 @@ static float gpuStopTimer() @@ -18,4 +24,8 @@ static float gpuStopTimer()
18 cudaEventDestroy(tStartEvent); 24 cudaEventDestroy(tStartEvent);
19 cudaEventDestroy(tStopEvent); 25 cudaEventDestroy(tStopEvent);
20 return elapsedTime; 26 return elapsedTime;
21 -}  
22 \ No newline at end of file 27 \ No newline at end of file
  28 +}
  29 +
  30 +} //end namespace stim
  31 +
  32 +#endif
23 \ No newline at end of file 33 \ No newline at end of file
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 #include "../envi/bip.h" 6 #include "../envi/bip.h"
7 #include "../envi/bil.h" 7 #include "../envi/bil.h"
8 #include <iostream> 8 #include <iostream>
9 -#include "../image/image.h" 9 +//#include "../image/image.h"
10 10
11 namespace stim{ 11 namespace stim{
12 12
@@ -927,7 +927,7 @@ public: @@ -927,7 +927,7 @@ public:
927 927
928 /// @param mask is a pointer to pre-allocated memory of size X*Y 928 /// @param mask is a pointer to pre-allocated memory of size X*Y
929 /// @param maskname is the file name for the image that will serve as the mask 929 /// @param maskname is the file name for the image that will serve as the mask
930 - bool load_mask(unsigned char * mask, std::string maskname){ 930 + /*bool load_mask(unsigned char * mask, std::string maskname){
931 //open the mask file 931 //open the mask file
932 stim::image<unsigned char> mask_image(maskname); 932 stim::image<unsigned char> mask_image(maskname);
933 mask_image.data_noninterleaved(mask); 933 mask_image.data_noninterleaved(mask);
@@ -935,7 +935,7 @@ public: @@ -935,7 +935,7 @@ public:
935 //memcpy(mask, mask_image.data_noninterleaved(), mask_image.size()); 935 //memcpy(mask, mask_image.data_noninterleaved(), mask_image.size());
936 //mask_image.clear(); 936 //mask_image.clear();
937 return true; 937 return true;
938 - } 938 + }*/
939 939
940 /// Calculate the mean value for all masked (or valid) pixels in a band and returns the average spectrum 940 /// Calculate the mean value for all masked (or valid) pixels in a band and returns the average spectrum
941 941