C# Class ClearCanvas.ImageViewer.StudyManagement.Sop

A DICOM SOP Instance.

Note that there should no longer be any need to derive from this class; the Sop, ImageSop and Frame classes are now just simple Bridge classes (see Bridge Design Pattern) to ISopDataSource and ISopFrameData. See the remarks for ISopDataSource for more information.

Also, for more information on 'transient references' and the lifetime of Sops, see ISopReference.

Inheritance: IDisposable, IDicomAttributeProvider, ISopInstanceData, ISeriesData, IStudyData, IPatientData
Mostrar archivo Open project: jasper-yeh/ClearCanvas Class Usage Examples

Private Properties

Property Type Description
GetImageSopClasses IEnumerable
GetSeriesIdentifier ISeriesIdentifier
GetStudyIdentifier IStudyRootStudyIdentifier
Initialize void
IsImageSop bool
IsImageSop bool
this DicomAttributeIDicomAttributeProvider.System
this DicomAttributeIDicomAttributeProvider.System

Public Methods

Method Description
Create ( ISopDataSource dataSource ) : Sop

Creates either a Sop or ImageSop based on the SopClass of the given ISopDataSource.

Create ( string filename ) : Sop

Creates either a Sop or ImageSop based on the SopClass of the SOP instance specified by filename.

GetIdentifier ( ) : IImageIdentifier

Gets an IImageIdentifier for this Sop.

An IImageIdentifier can be used in situations where you only need some data about the Sop, but not the Sop itself. It can be problematic to hold references to Sop objects outside the context of an IImageViewer without creating a transient reference because they are no longer valid when the viewer is closed; in these situations, it may be appropriate to use an identifier.

ResetCache ( ) : void

Resets any values that were cached after reading from DataSource.

Many of the property values are cached for performance reasons, as they generally never change, and parsing values from the image header can be expensive, especially when done repeatedly.

Sop ( ISopDataSource dataSource ) : System

Creates a new instance of Sop.

Sop ( string filename ) : System

Creates a new instance of Sop from a local file.

ToString ( ) : string

Returns the SOP instance UID in string form.

TryGetAttribute ( ClearCanvas.Dicom.DicomTag tag, ClearCanvas.Dicom.DicomAttribute &dicomAttribute ) : bool

Gets a specific DICOM attribute in the underlying native object.

DicomAttributes returned from this indexer are considered read-only and should not be modified in any way.

TryGetAttribute ( uint tag, ClearCanvas.Dicom.DicomAttribute &dicomAttribute ) : bool

Gets a specific DICOM attribute in the underlying native object.

DicomAttributes returned from this indexer are considered read-only and should not be modified in any way.

Validate ( ) : void

The Sop class (and derived classes) should not validate tag values from within its properties, but instead clients should call this method at an appropriate time to determine whether or not the Sop should be used or discarded as invalid.

ValidateAllowableTransferSyntax ( ) : void
this ( ClearCanvas.Dicom.DicomTag tag ) : ClearCanvas.Dicom.DicomAttribute

Gets a specific DICOM attribute in the underlying native object.

DicomAttributes returned from this indexer are considered read-only and should not be modified in any way.

this ( uint tag ) : ClearCanvas.Dicom.DicomAttribute

Gets a specific DICOM attribute in the underlying native object.

DicomAttributes returned from this indexer are considered read-only and should not be modified in any way.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Disposes all resources being used by this Sop.

GetAllowableTransferSyntaxes ( ) : IEnumerable
ValidateInternal ( ) : void

Validates the Sop object.

Derived classes should call the base class implementation first, and then do further validation. The Sop class validates properties deemed vital to usage of the object.

Private Methods

Method Description
GetImageSopClasses ( ) : IEnumerable
GetSeriesIdentifier ( ) : ISeriesIdentifier
GetStudyIdentifier ( ) : IStudyRootStudyIdentifier
Initialize ( ISopDataSource dataSource ) : void
IsImageSop ( ClearCanvas.Dicom.SopClass sopClass ) : bool
IsImageSop ( string sopClassUid ) : bool
this ( ClearCanvas.Dicom.DicomTag tag ) : DicomAttributeIDicomAttributeProvider.System
this ( uint tag ) : DicomAttributeIDicomAttributeProvider.System

Method Details

Create() public static method

Creates either a Sop or ImageSop based on the SopClass of the given ISopDataSource.
public static Create ( ISopDataSource dataSource ) : Sop
dataSource ISopDataSource
return Sop

Create() public static method

Creates either a Sop or ImageSop based on the SopClass of the SOP instance specified by filename.
public static Create ( string filename ) : Sop
filename string
return Sop

Dispose() protected method

Disposes all resources being used by this Sop.
protected Dispose ( bool disposing ) : void
disposing bool
return void

GetAllowableTransferSyntaxes() protected method

protected GetAllowableTransferSyntaxes ( ) : IEnumerable
return IEnumerable

GetIdentifier() public method

Gets an IImageIdentifier for this Sop.
An IImageIdentifier can be used in situations where you only need some data about the Sop, but not the Sop itself. It can be problematic to hold references to Sop objects outside the context of an IImageViewer without creating a transient reference because they are no longer valid when the viewer is closed; in these situations, it may be appropriate to use an identifier.
public GetIdentifier ( ) : IImageIdentifier
return IImageIdentifier

ResetCache() public method

Resets any values that were cached after reading from DataSource.
Many of the property values are cached for performance reasons, as they generally never change, and parsing values from the image header can be expensive, especially when done repeatedly.
public ResetCache ( ) : void
return void

Sop() public method

Creates a new instance of Sop.
public Sop ( ISopDataSource dataSource ) : System
dataSource ISopDataSource
return System

Sop() public method

Creates a new instance of Sop from a local file.
public Sop ( string filename ) : System
filename string The path to a local DICOM Part 10 file.
return System

ToString() public method

Returns the SOP instance UID in string form.
public ToString ( ) : string
return string

TryGetAttribute() public method

Gets a specific DICOM attribute in the underlying native object.
DicomAttributes returned from this indexer are considered read-only and should not be modified in any way.
Thrown if the specified DICOM tag is not within the valid range for either the meta info or the dataset.
public TryGetAttribute ( ClearCanvas.Dicom.DicomTag tag, ClearCanvas.Dicom.DicomAttribute &dicomAttribute ) : bool
tag ClearCanvas.Dicom.DicomTag The DICOM tag of the attribute to retrieve.
dicomAttribute ClearCanvas.Dicom.DicomAttribute Returns the requested .
return bool

TryGetAttribute() public method

Gets a specific DICOM attribute in the underlying native object.
DicomAttributes returned from this indexer are considered read-only and should not be modified in any way.
Thrown if the specified DICOM tag is not within the valid range for either the meta info or the dataset.
public TryGetAttribute ( uint tag, ClearCanvas.Dicom.DicomAttribute &dicomAttribute ) : bool
tag uint The DICOM tag of the attribute to retrieve.
dicomAttribute ClearCanvas.Dicom.DicomAttribute Returns the requested .
return bool

Validate() public method

The Sop class (and derived classes) should not validate tag values from within its properties, but instead clients should call this method at an appropriate time to determine whether or not the Sop should be used or discarded as invalid.
Thrown when validation fails.
public Validate ( ) : void
return void

ValidateAllowableTransferSyntax() public method

public ValidateAllowableTransferSyntax ( ) : void
return void

ValidateInternal() protected method

Validates the Sop object.
Derived classes should call the base class implementation first, and then do further validation. The Sop class validates properties deemed vital to usage of the object.
Thrown when validation fails.
protected ValidateInternal ( ) : void
return void

this() public method

Gets a specific DICOM attribute in the underlying native object.
DicomAttributes returned from this indexer are considered read-only and should not be modified in any way.
Thrown if the specified DICOM tag is not within the valid range for either the meta info or the dataset.
public this ( ClearCanvas.Dicom.DicomTag tag ) : ClearCanvas.Dicom.DicomAttribute
tag ClearCanvas.Dicom.DicomTag The DICOM tag of the attribute to retrieve.
return ClearCanvas.Dicom.DicomAttribute

this() public method

Gets a specific DICOM attribute in the underlying native object.
DicomAttributes returned from this indexer are considered read-only and should not be modified in any way.
Thrown if the specified DICOM tag is not within the valid range for either the meta info or the dataset.
public this ( uint tag ) : ClearCanvas.Dicom.DicomAttribute
tag uint The DICOM tag of the attribute to retrieve.
return ClearCanvas.Dicom.DicomAttribute