Skip to content

Commit 24a2ae1

Browse files
committed
Fixes issue with RChannel etc. indices.
1 parent d9d45f1 commit 24a2ae1

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

BioLib.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
<PackageIcon>banner.jpg</PackageIcon>
1212
<PackageReadmeFile>README.md</PackageReadmeFile>
1313
<RepositoryUrl>https://github.com/BiologyTools/BioLib</RepositoryUrl>
14-
<AssemblyVersion>3.4.1</AssemblyVersion>
15-
<FileVersion>3.4.1</FileVersion>
16-
<PackageVersion>3.4.1</PackageVersion>
14+
<AssemblyVersion>3.4.2</AssemblyVersion>
15+
<FileVersion>3.4.2</FileVersion>
16+
<PackageVersion>3.4.2</PackageVersion>
1717
<PackageLicenseExpression>GPL-3.0-only</PackageLicenseExpression>
1818
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
1919
<PackageProjectUrl>https://biologytools.github.io/</PackageProjectUrl>
2020
<PackageTags>Biology; ImageJ; Bio-Formats; OMERO; Image-Stacks; Microscopy; Whole-Slide-Image; QuPath; </PackageTags>
21-
<PackageReleaseNotes>Added reconnection code for OMERO server connection.</PackageReleaseNotes>
21+
<PackageReleaseNotes>Fixed issue with channel indices.</PackageReleaseNotes>
2222
<Authors>Erik Repo</Authors>
2323
<Platforms>AnyCPU;x64</Platforms>
2424
</PropertyGroup>

Source/Bio.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3043,7 +3043,7 @@ public string Filename
30433043
filename = value;
30443044
}
30453045
}
3046-
public int[] rgbChannels = new int[3];
3046+
public int[] rgbChannels = new int[3] { 0, 1, 2 };
30473047
public int RGBChannelCount
30483048
{
30493049
get
@@ -3434,7 +3434,7 @@ public Channel RChannel
34343434
{
34353435
get
34363436
{
3437-
if (Channels[0].range.Length == 1)
3437+
if(Channels.Count >= 3)
34383438
return Channels[rgbChannels[0]];
34393439
else
34403440
return Channels[0];
@@ -3444,20 +3444,20 @@ public Channel GChannel
34443444
{
34453445
get
34463446
{
3447-
if (Channels[1].range.Length == 1)
3447+
if (Channels.Count >= 3)
34483448
return Channels[rgbChannels[1]];
34493449
else
3450-
return Channels[1];
3450+
return Channels[0];
34513451
}
34523452
}
34533453
public Channel BChannel
34543454
{
34553455
get
34563456
{
3457-
if (Channels[2].range.Length == 1)
3457+
if (Channels.Count >= 3)
34583458
return Channels[rgbChannels[2]];
34593459
else
3460-
return Channels[2];
3460+
return Channels[0];
34613461
}
34623462
}
34633463
private List<ROI> annotationsR = new List<ROI>();

0 commit comments

Comments
 (0)