Skip to content

Commit

Permalink
fixed bug to account for channel number when using hu for ganglia
Browse files Browse the repository at this point in the history
  • Loading branch information
pr4deepr committed Mar 21, 2022
1 parent 1928f2e commit 0f01ac9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
15 changes: 13 additions & 2 deletions _Analyse Neuron (Multi-channel).ijm
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ if(ganglia_channel!="NA")
//Array.show(marker_names_manual);
//Array.show(marker_no_manual);
//exit("test");
if(sizeC>1)
if(sizeC>1 && Ganglia_detection!="Define ganglia using Hu")
{
if (Cell_counts_per_ganglia==true && cell_channel=="NA" && ganglia_channel=="NA") //count cells per ganglia but don't know channels for ganglia or neuron
{
Expand Down Expand Up @@ -326,7 +326,18 @@ if(sizeC>1)
}

}

else if(Ganglia_detection=="Define ganglia using Hu" && cell_channel=="NA")
{
waitForUser("Note the channels for "+cell_type+" and enter in the next box.");
Dialog.create("Choose channel for "+cell_type+);
Dialog.addNumber("Enter "+cell_type+" and ganglia channel", 3);
Dialog.show();
cell_channel= Dialog.getNumber();
ganglia_channel = cell_channel;
Stack.setChannel(cell_channel);
resetMinAndMax();
}
else if(Ganglia_detection=="Define ganglia using Hu") ganglia_channel = cell_channel;
else exit("Need multiple channels, only one channel found");


Expand Down
14 changes: 13 additions & 1 deletion _Analyse Neurons (Hu only).ijm
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ if(cell_channel!="NA")


//if more than one channel , check if appropriate values entered
if(sizeC>1)
if(sizeC>1 && Ganglia_detection!="Define ganglia using Hu")
{
if (Cell_counts_per_ganglia==true && cell_channel=="NA" && ganglia_channel=="NA") //count cells per ganglia but don't know channels for ganglia or neuron
{
Expand Down Expand Up @@ -252,6 +252,18 @@ if(sizeC>1)
}

}
else if(Ganglia_detection=="Define ganglia using Hu" && cell_channel=="NA")
{
waitForUser("Note the channels for "+cell_type+" and enter in the next box.");
Dialog.create("Choose channel for "+cell_type+);
Dialog.addNumber("Enter "+cell_type+" and ganglia channel", 3);
Dialog.show();
cell_channel= Dialog.getNumber();
ganglia_channel = cell_channel;
Stack.setChannel(cell_channel);
resetMinAndMax();
}
else if(Ganglia_detection=="Define ganglia using Hu") ganglia_channel = cell_channel;
else cell_channel = 1;


Expand Down

0 comments on commit 0f01ac9

Please sign in to comment.