C# 클래스 ClearCanvas.ImageViewer.RoiGraphics.Roi

Represents a static region of interest for the purposes of computing statistics on the contained pixels.

Roi objects are static definitions of a region of interest on a particular image. Its shape definition and the underlying pixel values are considered fixed upon construction, and hence its various properties and statistics are non-changing.

New instances of a Roi should be constructed everytime the definition of the region of interest or the underlying image pixel data has changed. The IGraphic.GetRoi method allows client code to quickly construct a new instance of a Roi based on the current definition of the graphic and the image it currently belongs to.

파일 보기 프로젝트 열기: jasper-yeh/ClearCanvas 1 사용 예제들

공개 메소드들

메소드 설명
Contains ( PointF point ) : bool

Tests to see if the given point is contained within the region of interest.

Regions of interest have no notion of coordinate system. All coordinates are inherently given relative to the image pixel space (i.e. CoordinateSystem.Source.)

Contains ( float x, float y ) : bool

Tests to see if the given point is contained within the region of interest.

Regions of interest have no notion of coordinate system. All coordinates are inherently given relative to the image pixel space (i.e. CoordinateSystem.Source.)

Contains ( int x, int y ) : bool

Tests to see if the given point is contained within the region of interest.

Regions of interest have no notion of coordinate system. All coordinates are inherently given relative to the image pixel space (i.e. CoordinateSystem.Source.)

CopyTo ( IPresentationImage presentationImage ) : Roi

Creates a copy of this Roi using the same region of interest shape but using a different image as the source pixel data.

GetBoundingBoxRounded ( bool constrainToImage ) : Rectangle

Returns a bounding box that has been rounded to the nearest whole pixel(s).

Uses RectangleUtilities.RoundInflate to ensure the bounding box returned will encompass every pixel that is inside the ROI.

GetPixelCoordinates ( ) : IEnumerable

Gets an enumeration of the coordinates of points contained within the region of interest.

Regions of interest have no notion of coordinate system. All coordinates are inherently given relative to the image pixel space (i.e. CoordinateSystem.Source.)

GetPixelValues ( ) : IEnumerable

Gets an enumeration of the modality LUT transformed pixel values contained within the region of interest rounded to the nearest integer.

If the ModalityLut is null, then this method enumerates the same values as GetRawPixelValues.

GetRawPixelValues ( ) : IEnumerable

Gets an enumeration of the raw pixel values contained within the region of interest.

보호된 메소드들

메소드 설명
ComputeBounds ( ) : RectangleF

Called by BoundingBox to compute the tightest bounding box of the region of interest.

This method is only called once and the result is cached for future accesses.

Regions of interest have no notion of coordinate system. All coordinates are inherently given relative to the image pixel space (i.e. CoordinateSystem.Source.)

ConvertFromSquarePixels ( double area, ClearCanvas.Dicom.Iod.Units units, PixelSpacing pixelSpacing ) : double

Converts an area in pixels into the given units given some particular pixel spacing.

Roi ( IPresentationImage presentationImage ) : System

Constructs a new region of interest, specifying an IPresentationImage as the source of the pixel data.

ValidateUnits ( ClearCanvas.Dicom.Iod.Units units, PixelSpacing pixelSpacing ) : bool

Checks if operations in the given units are possible with the pixelSpacing information available.

비공개 메소드들

메소드 설명
IsBoundingBoxInImage ( ) : bool

Checks whether or not the region of interest's bounding box intersects the image.

메소드 상세

ComputeBounds() 보호된 추상적인 메소드

Called by BoundingBox to compute the tightest bounding box of the region of interest.

This method is only called once and the result is cached for future accesses.

Regions of interest have no notion of coordinate system. All coordinates are inherently given relative to the image pixel space (i.e. CoordinateSystem.Source.)

protected abstract ComputeBounds ( ) : RectangleF
리턴 System.Drawing.RectangleF

Contains() 공개 추상적인 메소드

Tests to see if the given point is contained within the region of interest.
Regions of interest have no notion of coordinate system. All coordinates are inherently given relative to the image pixel space (i.e. CoordinateSystem.Source.)
public abstract Contains ( PointF point ) : bool
point System.Drawing.PointF The point to test.
리턴 bool

Contains() 공개 메소드

Tests to see if the given point is contained within the region of interest.
Regions of interest have no notion of coordinate system. All coordinates are inherently given relative to the image pixel space (i.e. CoordinateSystem.Source.)
public Contains ( float x, float y ) : bool
x float The X-coordinate of the point to test.
y float The Y-coordinate of the point to test.
리턴 bool

Contains() 공개 메소드

Tests to see if the given point is contained within the region of interest.
Regions of interest have no notion of coordinate system. All coordinates are inherently given relative to the image pixel space (i.e. CoordinateSystem.Source.)
public Contains ( int x, int y ) : bool
x int The X-coordinate of the point to test.
y int The Y-coordinate of the point to test.
리턴 bool

ConvertFromSquarePixels() 보호된 정적인 메소드

Converts an area in pixels into the given units given some particular pixel spacing.
Thrown if is a physical unit of measurement and is not calibrated.
protected static ConvertFromSquarePixels ( double area, ClearCanvas.Dicom.Iod.Units units, PixelSpacing pixelSpacing ) : double
area double The area of pixels to be converted.
units ClearCanvas.Dicom.Iod.Units The units into which the area should be converted.
pixelSpacing PixelSpacing The pixel spacing information available.
리턴 double

CopyTo() 공개 추상적인 메소드

Creates a copy of this Roi using the same region of interest shape but using a different image as the source pixel data.
public abstract CopyTo ( IPresentationImage presentationImage ) : Roi
presentationImage IPresentationImage The image upon which to copy this region of interest.
리턴 Roi

GetBoundingBoxRounded() 공개 메소드

Returns a bounding box that has been rounded to the nearest whole pixel(s).
Uses RectangleUtilities.RoundInflate to ensure the bounding box returned will encompass every pixel that is inside the ROI.
public GetBoundingBoxRounded ( bool constrainToImage ) : Rectangle
constrainToImage bool Whether or not the returned rectangle should also be constrained to the image bounds.
리턴 System.Drawing.Rectangle

GetPixelCoordinates() 공개 메소드

Gets an enumeration of the coordinates of points contained within the region of interest.
Regions of interest have no notion of coordinate system. All coordinates are inherently given relative to the image pixel space (i.e. CoordinateSystem.Source.)
public GetPixelCoordinates ( ) : IEnumerable
리턴 IEnumerable

GetPixelValues() 공개 메소드

Gets an enumeration of the modality LUT transformed pixel values contained within the region of interest rounded to the nearest integer.
If the ModalityLut is null, then this method enumerates the same values as GetRawPixelValues.
public GetPixelValues ( ) : IEnumerable
리턴 IEnumerable

GetRawPixelValues() 공개 메소드

Gets an enumeration of the raw pixel values contained within the region of interest.
public GetRawPixelValues ( ) : IEnumerable
리턴 IEnumerable

Roi() 보호된 메소드

Constructs a new region of interest, specifying an IPresentationImage as the source of the pixel data.
protected Roi ( IPresentationImage presentationImage ) : System
presentationImage IPresentationImage The image containing the source pixel data.
리턴 System

ValidateUnits() 보호된 정적인 메소드

Checks if operations in the given units are possible with the pixelSpacing information available.
protected static ValidateUnits ( ClearCanvas.Dicom.Iod.Units units, PixelSpacing pixelSpacing ) : bool
units ClearCanvas.Dicom.Iod.Units
pixelSpacing PixelSpacing
리턴 bool