     fragmentation_.reset(new Fragmentation<16>(this->size_));
 
     // setup internal memory
-    switch (this->u_->nChannels())
-    {
-    case 1:
-      this->u_.reset(new ImageGpu32fC1(this->size_));
-      this->u_prev_.reset(new ImageGpu32fC1(this->size_));
-      this->p_.reset(new ImageGpu32fC2(this->size_));
-      break;
-    default:
-      throw imp::cu::Exception("ROF denoising not implemented for given image type.",
-                               __FILE__, __FUNCTION__, __LINE__);
-    }
+    this->u_.reset(new ImageGpu32fC1(this->size_));
+    this->u_prev_.reset(new ImageGpu32fC1(this->size_));
+    this->p_.reset(new ImageGpu32fC2(this->size_));
+
 
     // setup textures
     this->f_tex_ = this->f_->genTexture(false,

}

//-----------------------------------------------------------------------------
__global__ void k_convertResult8uC1(unsigned char* u, size_t stride_u,
                                    imp::cu::Texture2D u_tex,
                                    size_t width, size_t height)
{


    u = (u + tau*(div + lambda*f)) / (1.0f + tau*lambda);

    d_u[y*stride_u + x] = u;
    d_u_prev[y*stride_u + x] = u + theta*(u-u_prev);
  }
}

