   cudaMemcpy3D(&copyDataParams);
   cudaMemcpy3D(&copyRegionParams);
 
-  cudaBindTextureToArray(data_texture, data_array);
-  cudaBindTextureToArray(region_texture, region_array);
+  cudaBindTextureToArray(data_texture, data_array, channelDesc);
+  cudaBindTextureToArray(region_texture, region_array, channelDesc);
 
 
 



__global__ void region_grow_kernel_shared(unsigned char* data, unsigned char* region, int* finished){

}






  data_texture.filterMode=cudaFilterModePoint;
  data_texture.addressMode[0]=cudaAddressModeWrap; 
  data_texture.addressMode[1]=cudaAddressModeWrap; 
  data_texture.addressMode[2]=cudaAddressModeClamp; 
  region_texture.filterMode=cudaFilterModePoint;
  region_texture.addressMode[0]=cudaAddressModeWrap; 
  region_texture.addressMode[1]=cudaAddressModeWrap; 
  region_texture.addressMode[2]=cudaAddressModeClamp; 

  //cudaChannelFormatDesc channelDesc = cudaCreateChannelDesc(32,0,0,0,cudaChannelFormatKindFloat);
  cudaChannelFormatDesc channelDesc = cudaCreateChannelDesc<float>();

  cudaExtent extent = make_cudaExtent(512,512,512);

  cudaArray* data_array;
  cudaArray* region_array;

  cudaMalloc3DArray(&data_array, &channelDesc, extent);
  cudaMalloc3DArray(&region_array, &channelDesc, extent);

  cudaMemcpy3DParms copyDataParams    = {0};
  cudaMemcpy3DParms copyRegionParams  = {0};
