Skip to content

Commit b704740

Browse files
Bug fixes and more user savety
1 parent 4eb4318 commit b704740

11 files changed

Lines changed: 57 additions & 37 deletions

View5D.jar

394 Bytes
Binary file not shown.

javacImageJ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ javac -target 1.8 -source 1.8 -deprecation -classpath ".:/usr/local/ImageJ/ij.ja
99
# javac -deprecation -classpath "." View5D_.java
1010
jar -cf View5D_.jar view5d/*.class plugins.config
1111
# cp /*.class /usr/local/ImageJ/plugins/View5D/
12-
cp View5D_.jar /mnt/c/Users/pi96doc/Desktop/Fiji.app/plugins/View5D_-2.3.5.jar
12+
cp View5D_.jar /mnt/c/Users/pi96doc/Desktop/Fiji.app/plugins/View5D_-2.3.6.jar
1313

1414
# cp View5D_.jar /usr/local/ImageJ/plugins/View5D/
1515
# cp View5D_.jar /windows/C/DriveF/JavaProgs/ImageJ/plugins/View5D/

javacPython

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ cp View5D_.jar "/mnt/c/NoBackup/DeconvCompileTest/DIPlib_3_2019/share/DIPimage/p
1515
cp View5D_.jar "../View5D.jar"
1616
cp View5D_.jar "/mnt/c/Users/pi96doc/.julia/artifacts/View5D.jar"
1717
cd ..
18-
cp View5D.jar "View5D_v2.3.5.jar"
19-
tar -czf "View5D_v2.3.5-jar.tar.gz" "View5D_v2.3.5.jar"
18+
cp View5D.jar "View5D_v2.3.6.jar"
19+
tar -czf "View5D_v2.3.6-jar.tar.gz" "View5D_v2.3.6.jar"
2020
# cp /*.class /usr/local/ImageJ/plugins/View5D/
2121
#cp View5D_.jar /usr/local/ImageJ/plugins/View5D/
2222
# cp View5D_.jar /windows/C/DriveF/JavaProgs/ImageJ/plugins/View5D/

src/View5D_.jar

394 Bytes
Binary file not shown.

src/view5d/ImageCanvas.class

582 Bytes
Binary file not shown.

src/view5d/ImageCanvas.java

Lines changed: 51 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -960,20 +960,18 @@ else if (e.isShiftDown()) // update gamma
960960
UpdateAll();
961961
}
962962
else {
963+
boolean lock_aspect = e.isControlDown(); // orthogonal Zoom
964+
boolean was_locked = otherCanvas2.AspectLocked.getState();
965+
966+
if (lock_aspect)
967+
otherCanvas2.AspectLocked.setState(true);
968+
963969
if (e.getWheelRotation() < 0) {
964970
ChangeZoom(1.125);
965971
} else {
966972
ChangeZoom(1.0 / 1.125);
967973
}
968-
if (e.isControlDown())// orthogonal Zoom
969-
if (e.getWheelRotation() < 0)
970-
{
971-
ChangeOrthoZoom(1.125);
972-
}
973-
else
974-
{
975-
ChangeOrthoZoom(1.0 / 1.125);
976-
}
974+
otherCanvas2.AspectLocked.setState(was_locked);
977975
}
978976
}
979977

@@ -1363,7 +1361,17 @@ public void keyPressed(KeyEvent e) {
13631361
{
13641362
myChar = '°';
13651363
}
1366-
1364+
1365+
if (KeyEvent.VK_F2== e.getKeyCode())
1366+
{
1367+
myChar = '^';
1368+
}
1369+
1370+
if (KeyEvent.VK_F1== e.getKeyCode())
1371+
{
1372+
myChar = '?';
1373+
}
1374+
13671375
int elem=my3ddata.ActiveElement,t=my3ddata.ActiveTime;
13681376

13691377
ImageCanvas PreferredCanvas=null;
@@ -1594,6 +1602,13 @@ public void ExportValues() {
15941602
// return myplot;
15951603
}
15961604

1605+
public boolean checkProceed(String txt) { // calls a user dialog to see if the user really wants to proceed
1606+
AGenericDialog question= new AGenericDialog("Warning!");
1607+
question.addMessage(txt + " modifies the data.\nDo you really want to proceed?");
1608+
question.showDialog();
1609+
return ! question.wasCanceled();
1610+
}
1611+
15971612

15981613
public void ProcessKey(char myChar) {
15991614
switch (myChar) {
@@ -1604,8 +1619,9 @@ public void ProcessKey(char myChar) {
16041619
centerCursor();
16051620
return;
16061621
case 'D':
1607-
my3ddata.DeleteActElement();
1608-
UpdateAllPanels();
1622+
if (checkProceed("Delete Element"))
1623+
my3ddata.DeleteActElement();
1624+
UpdateAllPanels();
16091625
return;
16101626
case 'f': // upcast datatype to float
16111627
my3ddata.CloneFloat();
@@ -1616,23 +1632,27 @@ public void ProcessKey(char myChar) {
16161632
UpdateAllPanels();
16171633
return;
16181634
case '+':
1619-
my3ddata.AddMarkedElement(); // Adds the gate element to the active element
1635+
if (checkProceed("AddMarkedElement"))
1636+
my3ddata.AddMarkedElement(); // Adds the gate element to the active element
16201637
UpdateAllPanels();
16211638
return;
16221639
case '_':
16231640
my3ddata.AdjustOffsetToROIMean(); // Subtracts the gate element from the active element
16241641
UpdateAllPanels();
16251642
return;
16261643
case '-':
1627-
my3ddata.SubMarkedElement(); // Subtracts the gate element from the active element
1644+
if (checkProceed("SubtractMarkedElement"))
1645+
my3ddata.SubMarkedElement(); // Subtracts the gate element from the active element
16281646
UpdateAllPanels();
16291647
return;
16301648
case '*':
1631-
my3ddata.MulMarkedElement(); // Multiplies the gate element with the active element
1649+
if (checkProceed("MultiplyMarkedElement"))
1650+
my3ddata.MulMarkedElement(); // Multiplies the gate element with the active element
16321651
UpdateAllPanels();
16331652
return;
16341653
case '/':
1635-
my3ddata.DivMarkedElement(); // Multiplies the gate element with the active element
1654+
if (checkProceed("DivideMarkedElement"))
1655+
my3ddata.DivMarkedElement(); // Multiplies the gate element with the active element
16361656
UpdateAllPanels();
16371657
return;
16381658
case 'e': // advance one element cyclicly
@@ -1837,31 +1857,31 @@ public void ProcessKey(char myChar) {
18371857
AspectLocked.setState(! AspectLocked.getState());
18381858
return;
18391859
case '#':
1840-
my3ddata.SubtractTrackedSpot();
1860+
my3ddata.SubtractTrackedSpot();
18411861
my3ddata.InvalidateProjs(-1); // all projections are invalid
18421862
my3ddata.InvalidateSlices();
1843-
UpdateAll();
1863+
UpdateAll();
18441864
return;
18451865
case 's':
18461866
AlternateViewer xx=new AlternateViewer(applet); // clone the data and open a new viewer
18471867
My3DData nd=new My3DData(my3ddata);
18481868
xx.Assign3DData(applet, null, nd);
1849-
UpdateAll();
1869+
UpdateAll();
18501870
return;
18511871
case 'P':
1852-
my3ddata.ToggleProj(DimNr,false);
1853-
label.CoordsChanged();
1854-
UpdateAll();
1872+
my3ddata.ToggleProj(DimNr,false);
1873+
label.CoordsChanged();
1874+
UpdateAll();
18551875
return ;
18561876
case 'p':
1857-
my3ddata.ToggleProj(DimNr,true);
1858-
UpdateAll();
1877+
my3ddata.ToggleProj(DimNr,true);
1878+
UpdateAll();
18591879
return ;
18601880
case '^':
1861-
my3ddata.ActElement().AdvanceReadMode();
1862-
my3ddata.InvalidateSlices();
1863-
my3ddata.InvalidateProjs(-1);
1864-
UpdateAll();
1881+
my3ddata.ActElement().AdvanceReadMode();
1882+
my3ddata.InvalidateSlices();
1883+
my3ddata.InvalidateProjs(-1);
1884+
UpdateAll();
18651885
return ;
18661886
case 'S':
18671887
if (! myPanel.ROIstarted && ! LineROIStarted) // otherwise the user has to finish the ROI first
@@ -1988,9 +2008,9 @@ public void ProcessKey(char myChar) {
19882008
//return ;
19892009
case '!': // transfers the colormap threshold to data threshold
19902010
// my3ddata.addLThresh(0.02);
1991-
my3ddata.CThreshToValThresh(-1,0.0,1.0);
1992-
UpdateAll();
1993-
return ;
2011+
my3ddata.CThreshToValThresh(-1,0.0,1.0);
2012+
UpdateAll();
2013+
return ;
19942014
case '1':
19952015
if (my3ddata.GateActive && (my3ddata.GateElem == my3ddata.GateElem))
19962016
{

src/view5d/ImgPanel.class

12 Bytes
Binary file not shown.

src/view5d/ImgPanel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,11 @@ public ImgPanel(Container app,My3DData mydata) {
225225
AddPopupMenu(SubMenu,doSubMenu);
226226

227227
MenuItem tmp;
228-
tmp = new MenuItem("Help [?]");
228+
tmp = new MenuItem("Help [? or F1]");
229229
tmp.addActionListener(new MyMenuProcessor(c1,'?')); SubMenu.add(tmp);
230230
tmp = new MenuItem("Exit [$]");
231231
tmp.addActionListener(new MyMenuProcessor(c1,'$')); SubMenu.add(tmp);
232-
tmp = new MenuItem("Readmode (Complex only) [^]");
232+
tmp = new MenuItem("Readmode (Complex only) [^ or F2]");
233233
tmp.addActionListener(new MyMenuProcessor(c1,'^')); SubMenu.add(tmp);
234234

235235
SubMenu = new Menu("Import/Export",false); // can eventually be dragged to the side

src/view5d/PositionLabel.class

0 Bytes
Binary file not shown.

src/view5d/View5D_.class

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)