Class Sample
Sample class that contains map, attached datas and meta data that is connected to sample. Is responsible for interaction between map data and attached data. Is also the only class that directly interacts with GUI.
Inheritance
Inherited Members
Namespace: CoreLibrary
Assembly: CoreLibrary.dll
Syntax
public class Sample
Constructors
Sample()
New Sample object.
Declaration
public Sample()
Sample(String, Map, Attachments, Metas)
Constructor for JSON serialization and deserialization. Note that the parameter names must match the attribute names (non case sensitive)
Declaration
[JsonConstructor]
public Sample(string name, Map map, Attachments attdatalist, Metas metalist)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the file |
Map | map | Map containing all stacks |
Attachments | attdatalist | List of attached datas |
Metas | metalist | List of sample metadata |
Properties
AttDataList
Declaration
public Attachments AttDataList { get; set; }
Property Value
Type | Description |
---|---|
Attachments |
Filepath
Declaration
[JsonIgnore]
public string Filepath { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Map
Declaration
public Map Map { get; set; }
Property Value
Type | Description |
---|---|
Map |
MetaList
Declaration
public Metas MetaList { get; set; }
Property Value
Type | Description |
---|---|
Metas |
Name
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
AdjustLevelX(Double, Double)
Adjust Level of Stack X.
Declaration
public void AdjustLevelX(double blackPoint, double whitePoint)
Parameters
Type | Name | Description |
---|---|---|
System.Double | blackPoint | Black point in percentage. |
System.Double | whitePoint | White point in percentage. |
AdjustLevelY(Double, Double)
Adjust Level of Stack Y.
Declaration
public void AdjustLevelY(double blackPoint, double whitePoint)
Parameters
Type | Name | Description |
---|---|---|
System.Double | blackPoint | Black point in percentage. |
System.Double | whitePoint | White point in percentage. |
AdjustLevelZ(Double, Double)
Adjust Level of Stack Z.
Declaration
public void AdjustLevelZ(double blackPoint, double whitePoint)
Parameters
Type | Name | Description |
---|---|---|
System.Double | blackPoint | Black point in percentage. |
System.Double | whitePoint | White point in percentage. |
AttachmentsByXCoordinate(Int32)
Search attachments that have specific X coordinate.
Declaration
public List<AttachedData> AttachmentsByXCoordinate(int x)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | X coordinate. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<AttachedData> | List of Attachments. |
AttachmentsByYCoordinate(Int32)
Search attachments that have specific Y coordinate.
Declaration
public List<AttachedData> AttachmentsByYCoordinate(int y)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | y | Y coordinate. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<AttachedData> | List of Attachments. |
AttachmentsByZCoordinate(Int32)
Search attachments that have specific Z coordinate.
Declaration
public List<AttachedData> AttachmentsByZCoordinate(int z)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | z | Z coordinate. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<AttachedData> | List of Attachments. |
CleanXStack()
Removes filepath, template and stack image from X stack.
Declaration
public void CleanXStack()
CleanYStack()
Removes filepath, template and stack image from Y stack.
Declaration
public void CleanYStack()
GetAttachements()
Returns Attached Data list.
Declaration
public Attachments GetAttachements()
Returns
Type | Description |
---|---|
Attachments | Returns all attached datas |
GetAttachment(String)
Search Attachment by name.
Declaration
public AttachedData GetAttachment(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Searched name. |
Returns
Type | Description |
---|---|
AttachedData | Attachment with specified name. |
GetBitDepth()
Get Map's bit depth.
Declaration
public int GetBitDepth()
Returns
Type | Description |
---|---|
System.Int32 | Bit depth of map. |
GetFilepath()
Get sample's filepath.
Declaration
public string GetFilepath()
Returns
Type | Description |
---|---|
System.String | Sample's filepath. |
GetFilepathX()
Get file path for stack X.
Declaration
public string GetFilepathX()
Returns
Type | Description |
---|---|
System.String | Stack X filepath. |
GetFilepathY()
Get file path for stack Y.
Declaration
public string GetFilepathY()
Returns
Type | Description |
---|---|
System.String | Stack Y filepath. |
GetFilepathZ()
Get file path for stack Z.
Declaration
public string GetFilepathZ()
Returns
Type | Description |
---|---|
System.String | Stack Z filepath. |
GetMapFileType()
Get Map's file type.
Declaration
public string GetMapFileType()
Returns
Type | Description |
---|---|
System.String | File type extension of Map's file name. |
GetMarkCount(Int32)
Gets the Mark amount from specified dimension 1 = X depth, 2 = Y depth, 3 = Z depth TODO: use enum instead of an integer?
Declaration
public int[] GetMarkCount(int depth)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | depth |
Returns
Type | Description |
---|---|
System.Int32[] |
GetSliceX()
Getting Slice X as byte array.
Declaration
public byte[] GetSliceX()
Returns
Type | Description |
---|---|
System.Byte[] | Slice X as byte array |
GetSliceY()
Getting Slice Y as byte array.
Declaration
public byte[] GetSliceY()
Returns
Type | Description |
---|---|
System.Byte[] | Slice Y as byte array |
GetSliceZ()
Getting Slice Z as byte array.
Declaration
public byte[] GetSliceZ()
Returns
Type | Description |
---|---|
System.Byte[] | Slice Z as byte array |
SetByteDepth(Int32)
Sets byte depth for Map. Used for Raw files.
Declaration
public void SetByteDepth(int byteDepth)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | byteDepth | Byte depth. |
SetFilepathX(String)
Setting Filepath for Stack X
Declaration
public void SetFilepathX(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | File path for Stack X |
SetFilepathY(String)
Setting Filepath for Stack Y
Declaration
public void SetFilepathY(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | File path for Stack Y |
SetFilepathZ(String)
Setting Filepath for Stack Z.
Declaration
public void SetFilepathZ(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | File path for Stack Z |
SetImageSequence()
Sets the Map file type as image sequence.
Declaration
public void SetImageSequence()
SetLittleEndian(Boolean)
Sets little endian for Map. Used for Raw files.
Declaration
public void SetLittleEndian(bool littleEndian)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | littleEndian | True if little endian, false if big endian. |
SetMapDepth(Int32)
Sets how many images the Map has in Z-axis.
Declaration
public void SetMapDepth(int mapDepth)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | mapDepth | Number of images. |
SetMapHeight(Int32)
Sets height for Map.
Declaration
public void SetMapHeight(int mapHeight)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | mapHeight | Height of Map. |
SetMapTemplateX(String)
Setting template for X stack. Only used for Image Sequence.
Declaration
public void SetMapTemplateX(string template)
Parameters
Type | Name | Description |
---|---|---|
System.String | template | Template |
SetMapTemplateY(String)
Setting template for Y stack. Only used for Image Sequence.
Declaration
public void SetMapTemplateY(string template)
Parameters
Type | Name | Description |
---|---|---|
System.String | template | Template |
SetMapTemplateZ(String)
Setting template for Z stack. Only used for Image Sequence.
Declaration
public void SetMapTemplateZ(string template)
Parameters
Type | Name | Description |
---|---|---|
System.String | template | Template |
SetMapWidth(Int32)
Sets width of Map.
Declaration
public void SetMapWidth(int mapWidth)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | mapWidth | Width of Map. |
SetRaw()
Sets the Map file type as Raw.
Declaration
public void SetRaw()
SetSampleRelations(String)
Sets sample relations according to the given filepath
Declaration
public void SetSampleRelations(string relativeTo)
Parameters
Type | Name | Description |
---|---|---|
System.String | relativeTo | Filepath that all others are relative to |
SetSlicesZ(String)
Setting the depth of Z.
Declaration
public void SetSlicesZ(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | File path |
SetTiff3D()
Sets the Map file type as multiframe tiff.
Declaration
public void SetTiff3D()
UpdateStackX(Int32)
Updating stack X when depth changes
Declaration
public void UpdateStackX(int depth)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | depth | Depth of slice |
UpdateStackY(Int32)
Updating stack Y when depth changes
Declaration
public void UpdateStackY(int depth)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | depth | Depth of slice |
UpdateStackZ(Int32)
Updating stack Z when depth changes
Declaration
public void UpdateStackZ(int depth)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | depth | Depth of slice |