In my project, I need to convert the itk::Image to itk::GPUImage. However, I find the time is too long (~ 3s) in release version.
The code is:
start1 = clock(); CPUTOGPUImageFilterPointer cpuToGpuImageFilter = CPUTOGPUImageFilterType::New(); cpuToGpuImageFilter->SetInput(m_cpuMovingImage); cpuToGpuImageFilter->UpdateLargestPossibleRegion(); m_gpuMovingImage = cpuToGpuImageFilter->GetOutput(); end1 = clock(); std::cout << "cpu to gpu image time:" << (double)(end1 - start1) / CLOCKS_PER_SEC << std::endl;
And the information in console is:
cpu to gpu image time:3.441
Why it would cost so much time? Or is there any thing wrong with my code?