Class Slice
Slice class contains one slice in image form and also the filepath. Responsible of updating the image when given a new depth and turning the image to byte array.
Inheritance
System.Object
Slice
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: CoreLibrary
Assembly: CoreLibrary.dll
Syntax
public class Slice
Constructors
Slice()
Default constructor of Slice.
Declaration
public Slice()
Slice(RelativeFilepath, String)
Constructor for JSON serialization and deserialization. Note that the parameter names must match the attribute names (non case sensitive)
Declaration
[JsonConstructor]
public Slice(RelativeFilepath filepath, string template)
Parameters
Type | Name | Description |
---|---|---|
RelativeFilepath | filepath | |
System.String | template |
Fields
Stack
Declaration
[JsonIgnore]
public MagickImage Stack
Field Value
Type | Description |
---|---|
MagickImage |
Properties
Filepath
Declaration
public RelativeFilepath Filepath { get; set; }
Property Value
Type | Description |
---|---|
RelativeFilepath |
Template
Declaration
public string Template { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
GetAsByteArray()
Return the slice as a byte array. Contains image file.
Declaration
public byte[] GetAsByteArray()
Returns
Type | Description |
---|---|
System.Byte[] | Byte array of the slice image file. |
GetFilepath()
Get file path for the slice.
Declaration
public string GetFilepath()
Returns
Type | Description |
---|---|
System.String | File path. |
SetFilepath(String)
Setting file path for the slice.
Declaration
public void SetFilepath(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | File path. |
UpdateImgSeq(Int32)
Updates the slice if Map is set as image sequence.
Declaration
public void UpdateImgSeq(int depth)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | depth | Requested slice |