 
 	//copy information to GPU
 	cudaMemcpyToSymbolAsync(info, &information, sizeof(Voxel_Classifier_Information) );
+	int VolumeSize = information.VolumeSize[0]*information.VolumeSize[1]*information.VolumeSize[2];
 
 	//translate input onto device
 	float* dev_InputData = 0;
-	cudaMalloc( (void**) &dev_InputData, 2*sizeof(float)*information.VolumeSize[0]*information.VolumeSize[1]*information.VolumeSize[2] );
-	cudaMemcpyAsync(dev_InputData,inputData, 2*sizeof(float)*information.VolumeSize[0]*information.VolumeSize[1]*information.VolumeSize[2], 
+	cudaMalloc( (void**) &dev_InputData, 2*sizeof(float)*VolumeSize );
+	cudaMemcpyAsync(dev_InputData,inputData, 2*sizeof(float)*VolumeSize, 
 					cudaMemcpyHostToDevice, *stream);
 
 	//translate classification textures onto the device

	classification = (inClipping && inKeyhole) ? - tex2D(ClassifyKeyholeTexture, value.x, value.y) : classification;

	//output the final classification
	if( index.z < info.VolumeSize[2] ) outputVolume[inIndex] = classification;
}

void CUDAalgo_classifyVoxels( float* inputData, short* inputPrimaryTexture, short* inputKeyholeTexture, int textureSize,


__global__ void ClassifyVolume( const float2* inputVolume, short* outputVolume ){
	//get the index of the thread in the volume
	int inIndex = threadIdx.x + NUM_THREADS * (blockIdx.x + gridDim.x*(blockIdx.y + gridDim.y*blockIdx.z));
	int3 index;
	index.x = inIndex % info.VolumeSize[0];
	index.z = inIndex / info.VolumeSize[0];
