Package boofcv.struct.image
Class ImageMultiBand<T extends ImageMultiBand<T>>
java.lang.Object
boofcv.struct.image.ImageBase<T>
boofcv.struct.image.ImageMultiBand<T>
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
ImageInterleaved
,Planar
Base class for images with multiple bands.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class boofcv.struct.image.ImageBase
ImageBase.PixelXY
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract int
Returns the number of bands or colors stored in this image.void
reshape
(int width, int height, int numberOfBands) Reshape for MultiBand images which allows the number of bands to be changed a the same time toovoid
If the input image is a ImageMultiBand then the shape with match (width, height, bands) if single band then the number of bands will remain the same while just matching (width, height)abstract void
setNumberOfBands
(int bands) Changes the number of bands in the image while keeping the width and height the same.Methods inherited from class boofcv.struct.image.ImageBase
clone, copyCol, copyRow, createNew, createSameShape, forEachXY, getImageType, getIndex, indexToPixelX, indexToPixelY, isInBounds, isSameShape, isSubimage, reshape, setTo, subimage, subimage, totalPixels
-
Constructor Details
-
ImageMultiBand
public ImageMultiBand()
-
-
Method Details
-
getNumBands
public abstract int getNumBands()Returns the number of bands or colors stored in this image.- Returns:
- Number of bands in the image.
-
setNumberOfBands
public abstract void setNumberOfBands(int bands) Changes the number of bands in the image while keeping the width and height the same. A simple reshape is done if possible, if not then new internal data is defined- Parameters:
bands
- number of bands
-
reshape
public void reshape(int width, int height, int numberOfBands) Reshape for MultiBand images which allows the number of bands to be changed a the same time too- Parameters:
width
- Desired image widthheight
- Desired image heightnumberOfBands
- Desired number of bands
-
reshapeTo
If the input image is a ImageMultiBand then the shape with match (width, height, bands) if single band then the number of bands will remain the same while just matching (width, height)- Overrides:
reshapeTo
in classImageBase<T extends ImageMultiBand<T>>
- Parameters:
image
- Image whose shape will be matched
-