jcuda.jnpp.utilnpp
Class AbstractImagePacked<T extends jcuda.jnpp.types.NppType>

java.lang.Object
  extended by jcuda.jnpp.utilnpp.AbstractImage
      extended by jcuda.jnpp.utilnpp.AbstractImagePacked<T>
Type Parameters:
T - The content type of the image
All Implemented Interfaces:
Image, ImagePacked<T>
Direct Known Subclasses:
ImagesCPU.ImageCPU, ImagesNPP.ImageNPP

abstract class AbstractImagePacked<T extends jcuda.jnpp.types.NppType>
extends AbstractImage
implements ImagePacked<T>

Abstract base implementation of an ImagePacked.


Nested Class Summary
 
Nested classes/interfaces inherited from interface jcuda.jnpp.utilnpp.ImagePacked
ImagePacked.Pixel
 
Nested classes/interfaces inherited from interface jcuda.jnpp.utilnpp.Image
Image.Size
 
Field Summary
protected  jcuda.jnpp.TypedPointer<T> aPixels_
          The pointer to the pixel data of this image
protected  int nPitch_
          The pitch of this image
 
Constructor Summary
protected AbstractImagePacked()
          Creates a new, uninitialized AbstractImagePacked
protected AbstractImagePacked(Image.Size rSize)
          Creates a new AbstractImagePacked with the given size
protected AbstractImagePacked(ImagePacked<T> rImage)
          Creates a new AbstractImagePacked that is a copy of the given image.
protected AbstractImagePacked(int width, int height)
          Creates a new AbstractImagePacked with the given size
 
Method Summary
protected abstract  Allocator<T> allocator()
          Returns the allocator that performs all memory operations for this image.
 jcuda.jnpp.TypedPointer<T> data()
          Returns the pointer to the image data
 void destroy()
          Destroy this AbstractImagePacked.
 int pitch()
          Returns the pitch of this image
 ImagePacked.Pixel[] pixels(int nx, int ny)
          TODO: ImagePacked#pixels(int, int) NOT IMPLEMENTED YET
 void set(ImagePacked<T> rImage)
          Set this image to have the contents of the given image
 
Methods inherited from class jcuda.jnpp.utilnpp.AbstractImage
equals, hashCode, height, set, size, swap, width
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jcuda.jnpp.utilnpp.Image
height, set, size, swap, width
 

Field Detail

aPixels_

protected jcuda.jnpp.TypedPointer<T extends jcuda.jnpp.types.NppType> aPixels_
The pointer to the pixel data of this image


nPitch_

protected int nPitch_
The pitch of this image

Constructor Detail

AbstractImagePacked

protected AbstractImagePacked()
Creates a new, uninitialized AbstractImagePacked


AbstractImagePacked

protected AbstractImagePacked(int width,
                              int height)
Creates a new AbstractImagePacked with the given size

Parameters:
width - The width
height - The height

AbstractImagePacked

protected AbstractImagePacked(Image.Size rSize)
Creates a new AbstractImagePacked with the given size

Parameters:
rSize - The size

AbstractImagePacked

protected AbstractImagePacked(ImagePacked<T> rImage)
Creates a new AbstractImagePacked that is a copy of the given image.

Parameters:
rImage - The other image
Method Detail

destroy

public void destroy()
Destroy this AbstractImagePacked. TODO: This corresponds to the destructor, but has to be called explicitly!


allocator

protected abstract Allocator<T> allocator()
Returns the allocator that performs all memory operations for this image.

Returns:
The allocator.

set

public void set(ImagePacked<T> rImage)
Description copied from interface: ImagePacked
Set this image to have the contents of the given image

Specified by:
set in interface ImagePacked<T extends jcuda.jnpp.types.NppType>
Parameters:
rImage - The other image

pitch

public int pitch()
Description copied from interface: ImagePacked
Returns the pitch of this image

Specified by:
pitch in interface ImagePacked<T extends jcuda.jnpp.types.NppType>
Returns:
The pitch of this image

pixels

public ImagePacked.Pixel[] pixels(int nx,
                                  int ny)
Description copied from interface: ImagePacked
TODO: ImagePacked#pixels(int, int) NOT IMPLEMENTED YET

Specified by:
pixels in interface ImagePacked<T extends jcuda.jnpp.types.NppType>
Returns:

data

public jcuda.jnpp.TypedPointer<T> data()
Description copied from interface: ImagePacked
Returns the pointer to the image data

Specified by:
data in interface ImagePacked<T extends jcuda.jnpp.types.NppType>
Returns:
The pointer to the image data