| IOLink C# 1.11.0

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | List of all members
IOLink.ImageView Class Reference

Interface representing an N dimensional image. More...

Inheritance diagram for IOLink.ImageView:

## Public Member Functions
| ImageView (global::System.IntPtr cPtr, bool cMemoryOwn)
uint | GetDimensionCount ()
| Returns the dimension of the View.
bool | Support (ImageCapabilitySet flags)
| Checks if the ImageView supports the given capabilities.
virtual ImageCapabilitySet | GetCapabilities ()
| Return the capabilities of this image.
virtual VectorXu64 | GetShape ()
| Return the shape of the image, each component containing the size in this dimension.
virtual DataType | GetType ()
| Return the data type of the samples of this image.
virtual ReadonlyImageProperties | GetProperties ()
| Return the view's properties.
string | ToString ()
| Return a string representation.
virtual ReadonlyMetadataNode | GetMetadata ()
| Return the root node of the metadata attached to this image.
unsafe void | Read (VectorXu64 index, byte[] dst)
| Read the data at the given index into a buffer.
unsafe void | ReadRegion (RegionXu64 region, byte[] dst)
| Read a region of the image into a buffer.
ImageInterpretation | GetImageInterpretation ()
| Shortcut to access Image interpretation from image properties.
ImageType | GetAxesInterpretation ()
| Shortcut to access axes interpretation from image properties.
Vector3d | GetSpatialOrigin ()
| Shortcut to access spatial origin from image properties.
Vector3d | GetSpatialSpacing ()
| Shortcut to access spatial spacing from image properties.
string | GetSpatialUnit ()
| Shortcut to access the spatial unit from image properties.
SpatialDirections | GetSpatialDirections ()
| Shortcut to access spatial directions from image properties.
uint | GetBitDepth ()
| Shortcut to access the sample bitdepth from image properties.
bool | GetHasAlpha ()
| Shortcut to access hasAlpha status from image properties.
Vector2d | GetValueRange ()
| Shortcut to access the sample value range from image properties.
virtual void | SetProperties (ReadonlyImageProperties properties)
| Update the image's properties.
virtual void | SetMetadata (MetadataNode metadata)
| Attach a new metadata node to the image.
unsafe void | Write (VectorXu64 index, byte[] src)
| Write value from a buffer at the given index.
unsafe void | WriteRegion (RegionXu64 region, byte[] src)
| Write a input buffer into a given region of the image.
void | SetImageInterpretation (ImageInterpretation interpretation)
| Shortcut to set Image interpretation into image properties.
void | SetAxesInterpretation (ImageType type)
| Shortcut to set axes interpretation into image properties.
void | SetSpatialOrigin (Vector3d origin)
| Shortcut to set spatial origin into image properties.
void | SetSpatialSpacing (Vector3d spacing)
| Shortcut to set spatial spacing into image properties.
void | SetSpatialUnit (string unit)
| Shortcut to set spatial unit into image properties.
void | SetSpatialDirections (SpatialDirections directions)
| Shortcut to set spatial direcitons into image properties.
void | SetBitDepth (uint bitDepth)
| Shortcut to set sample bitdepth into image properties.
void | SetAlpha (bool value)
| Shortcut to indicate the presence of an alpha channel into image properties.
void | SetValueRange (Vector2d range)
| Shortcut to set sample value range into image properties.
virtual void | Reshape (VectorXu64 shape, DataType dataType)
| Change the shape and sample data type of the image.
TilingInfoExtension | TilingInfo ()
| Shortcut to retrieve TilingInfo extension.
ParallelAccessExtension | ParallelAccess ()
| Shortcut to retrieve ParallelAccess extension.
global::System.IntPtr | RawBuffer ()
Public Member Functions inherited from IOLink.View
| View (global::System.IntPtr cPtr, bool cMemoryOwn)
void | Dispose ()
T | Extension< T > ()
| Get an extension, with automatic upcasting.
virtual Extension | Extension (uint id)
| Get an extension of the view, corresponding to the given identifier.
ViewOriginExtension | ViewOrigin ()
| Shortcut to access to ViewOrigin extension.

## Static Public Member Functions
static global::System.Runtime.InteropServices.HandleRef | getCPtr (ImageView obj)
Static Public Member Functions inherited from IOLink.View
static global::System.Runtime.InteropServices.HandleRef | getCPtr (View obj)

## Protected Member Functions
override void | Dispose (bool disposing)

## Properties
ImageCapabilitySet | Capabilities`[get]`
| The Capabilities on the `ImageView`
uint | DimensionCount`[get]`
| The number of dimensions in this `ImageView`'s shape.
VectorXu64 | Shape`[get]`
| The `ImageView` shape, the size of each of its dimensions.
DataType | Type`[get]`
| The type of the image's elements.
ReadonlyImageProperties | Properties`[get, set]`
| The `ImageProperties` associated with this `ImageView` instance.
ReadonlyMetadataNode | Metadata`[get, set]`
| The `MetadataNode` associated with this `ImageView` instance.
ImageInterpretation | ImageInterpretation`[get, set]`
| The `ImageInterpretation` associated with this `ImageView` instance.
ImageType | AxesInterpretation`[get, set]`
| The `AxesInterpretation` associated with this `ImageView` instance.
uint | BitDepth`[get, set]`
| The `BitDepth` associated with this `ImageView` instance.
bool | HasAlpha`[get, set]`
| The `HasAlpha` associated with this `ImageView` instance.
SpatialDirections | SpatialDirections`[get, set]`
| The `SpatialDirections` associated with this `ImageView` instance.
Vector3d | SpatialOrigin`[get, set]`
| The `SpatialOrigin` associated with this `ImageView` instance.
Vector3d | SpatialSpacing`[get, set]`
| The `SpatialSpacing` associated with this `ImageView` instance.
string | SpatialUnit`[get, set]`
| `ImageView` instance
Vector2d | ValueRange`[get, set]`
| `ImageView` instance

## Detailed Description

Interface representing an N dimensional image.

This class can handle multidimensional image, for example:

- A 2D image has 2 dimensions.
- A 3D Volume has 3 dimensions.
- A 2D time series has 3 dimensions, where 3rd one represent time.

This interface capabilities are indicated by the ImageCapabilitySet returned by the method ImageView::capabilities. Each capability enable the use of a specific set of methods. When one of those methods is called, if its corresponding capability is not supported, a NotImplemented exception will be thrown.

An ImageView is composed of the following parts:

- A shape, that describes the size of the dataset along each of its axes.
- A data type, giving info on what is stored on each element of the dataset.
- Properties, giving generic info on the image, such as its spatial calibration, the semantic of its dimensions, and detailed information on its elements.
- Metadata, hierarchical tree of key/value pair, describing arbitrary information.
- Image's data itself.

Examples
  CheckerBoard.cs, CheckerBoardFast.cs, ColorWheel.cs, CopyImageView.cs, DiskImageView.cs, GradientFloatImage.cs, GradientFloatToInt.cs, GrayscaleSphere.cs, MetadataTree.cs, and VolumeFromStack.cs.

## Member Function Documentation

## ◆ Dispose()

override void IOLink.ImageView.Dispose | ( | bool | disposing | ) |
| inline protected virtual

Reimplemented from IOLink.View.

## ◆ GetAxesInterpretation()

ImageType IOLink.ImageView.GetAxesInterpretation | ( |  | ) |
| inline

Shortcut to access axes interpretation from image properties.

Returns
  axes interpretation of the image

## ◆ GetBitDepth()

uint IOLink.ImageView.GetBitDepth | ( |  | ) |
| inline

Shortcut to access the sample bitdepth from image properties.

Returns
  bitdepth of the image

## ◆ GetHasAlpha()

bool IOLink.ImageView.GetHasAlpha | ( |  | ) |
| inline

Shortcut to access hasAlpha status from image properties.

Returns
  TRUE if image has an alpha channel, FALSE otherwise

## ◆ GetImageInterpretation()

ImageInterpretation IOLink.ImageView.GetImageInterpretation | ( |  | ) |
| inline

Shortcut to access Image interpretation from image properties.

Returns
  interpretation of the image

## ◆ GetMetadata()

virtual ReadonlyMetadataNode IOLink.ImageView.GetMetadata | ( |  | ) |
| inline virtual

Return the root node of the metadata attached to this image.

Available when the ImageView has the READ capability.

Exceptions

  NotImplemented | If the implementation does not support reading.

## ◆ GetShape()

virtual VectorXu64 IOLink.ImageView.GetShape | ( |  | ) |
| inline virtual

Return the shape of the image, each component containing the size in this dimension.

Example:

- A 2D image will return a vector with two dimension, the first being the number of columns, and the second being the number of rows.
- A 3D image will return a vector with two dimension, the first being the number of columns, the second being the number of rows, and the third being the number of slices.

## ◆ GetSpatialDirections()

SpatialDirections IOLink.ImageView.GetSpatialDirections | ( |  | ) |
| inline

Shortcut to access spatial directions from image properties.

Returns
  spatial directions of the image

## ◆ GetSpatialOrigin()

Vector3d IOLink.ImageView.GetSpatialOrigin | ( |  | ) |
| inline

Shortcut to access spatial origin from image properties.

Returns
  spatial origin of the image

## ◆ GetSpatialSpacing()

Vector3d IOLink.ImageView.GetSpatialSpacing | ( |  | ) |
| inline

Shortcut to access spatial spacing from image properties.

Returns
  spatial spacing of the image

## ◆ GetSpatialUnit()

string IOLink.ImageView.GetSpatialUnit | ( |  | ) |
| inline

Shortcut to access the spatial unit from image properties.

Returns
  spatial unit of the image

## ◆ GetValueRange()

Vector2d IOLink.ImageView.GetValueRange | ( |  | ) |
| inline

Shortcut to access the sample value range from image properties.

Returns
  value range for the image samples

## ◆ RawBuffer()

global.System.IntPtr IOLink.ImageView.RawBuffer | ( |  | ) |
| inline

Returns the underlying buffer of the image.

## ◆ Read()

unsafe void IOLink.ImageView.Read | ( | VectorXu64 | index,
|  | byte[] | dst
| ) |  |
| inline

Read the data at the given index into a buffer.

Available when the ImageView has the READ capability.

Default implementation will call the readRegion method with a region of one pixel.

Parameters

  index | the index of the sample to read.
  dst | The buffer where read data will be copied.

## ◆ ReadRegion()

unsafe void IOLink.ImageView.ReadRegion | ( | RegionXu64 | region,
|  | byte[] | dst
| ) |  |
| inline

Read a region of the image into a buffer.

Available when the ImageView has the READ capability.

Parameters

  region | The region of the image to read from.
  dst | The buffer where read data will be copied.

Exceptions

  NotImplemented | If the implementation does not support reading.

Examples
  CopyImageView.cs, GradientFloatImage.cs, and GradientFloatToInt.cs.

## ◆ Reshape()

virtual void IOLink.ImageView.Reshape | ( | VectorXu64 | shape,
|  | DataType | dataType
| ) |  |
| inline virtual

Change the shape and sample data type of the image.

Available when the ImageView has the RESHAPE capability.

All the image's data is invalidated after this operation.

Parameters

  shape | The new shape.
  dataType | The new sample data type.

Exceptions

  NotImplemented | If the implementation does not support reshaping.

Examples
  CopyImageView.cs.

## ◆ SetAlpha()

void IOLink.ImageView.SetAlpha | ( | bool | value | ) |
| inline

Shortcut to indicate the presence of an alpha channel into image properties.

Parameters

  value | TRUE if image has an alpha channel, FALSE otherwise

## ◆ SetAxesInterpretation()

void IOLink.ImageView.SetAxesInterpretation | ( | ImageType | type | ) |
| inline

Shortcut to set axes interpretation into image properties.

Parameters

  type | Axes interpretation to set

## ◆ SetBitDepth()

void IOLink.ImageView.SetBitDepth | ( | uint | bitDepth | ) |
| inline

Shortcut to set sample bitdepth into image properties.

Parameters

  bitDepth | bitDepth to set

## ◆ SetImageInterpretation()

void IOLink.ImageView.SetImageInterpretation | ( | ImageInterpretation | interpretation | ) |
| inline

Shortcut to set Image interpretation into image properties.

Parameters

  interpretation | Image interpretation to set

## ◆ SetMetadata()

virtual void IOLink.ImageView.SetMetadata | ( | MetadataNode | metadata | ) |
| inline virtual

Attach a new metadata node to the image.

Available when the ImageView has the WRITE capability.

Exceptions

  NotImplemented | If the implementation does not support writing.

## ◆ SetProperties()

virtual void IOLink.ImageView.SetProperties | ( | ReadonlyImageProperties | properties | ) |
| inline virtual

Update the image's properties.

Available when the ImageView has the WRITE capability.

Exceptions

  NotImplemented | If the implementation does not support writing.

## ◆ SetSpatialDirections()

void IOLink.ImageView.SetSpatialDirections | ( | SpatialDirections | directions | ) |
| inline

Shortcut to set spatial direcitons into image properties.

Parameters

  directions | spatial directions to set

## ◆ SetSpatialOrigin()

void IOLink.ImageView.SetSpatialOrigin | ( | Vector3d | origin | ) |
| inline

Shortcut to set spatial origin into image properties.

Parameters

  origin | spatial origin to set

## ◆ SetSpatialSpacing()

void IOLink.ImageView.SetSpatialSpacing | ( | Vector3d | spacing | ) |
| inline

Shortcut to set spatial spacing into image properties.

Parameters

  spacing | spatial spacing to set

## ◆ SetSpatialUnit()

void IOLink.ImageView.SetSpatialUnit | ( | string | unit | ) |
| inline

Shortcut to set spatial unit into image properties.

Parameters

  unit | spatial unit to set

## ◆ SetValueRange()

void IOLink.ImageView.SetValueRange | ( | Vector2d | range | ) |
| inline

Shortcut to set sample value range into image properties.

Parameters

  range | value range to set

## ◆ Write()

unsafe void IOLink.ImageView.Write | ( | VectorXu64 | index,
|  | byte[] | src
| ) |  |
| inline

Write value from a buffer at the given index.

Available when the ImageView has the WRITE capability.

Default implementation will call the writeRegion method with a region of one pixel.

Parameters

  index | The index of the image's sample to write.
  src | The buffer containing the data that will be written.

Examples
  CheckerBoard.cs, ColorWheel.cs, and GrayscaleSphere.cs.

## ◆ WriteRegion()

unsafe void IOLink.ImageView.WriteRegion | ( | RegionXu64 | region,
|  | byte[] | src
| ) |  |
| inline

Write a input buffer into a given region of the image.

Available when the ImageView has the WRITE capability.

Parameters

  region | The region to write.
  src | The buffer containing the data that will be written.

Exceptions

  NotImplemented | If the implementation does not support writing.

Examples
  CheckerBoardFast.cs, CopyImageView.cs, DiskImageView.cs, GradientFloatImage.cs, GradientFloatToInt.cs, and VolumeFromStack.cs.

The documentation for this class was generated from the following file:

- Release/net/generated/ImageView.cs