-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not pre-compute contrast limits for sources that are too large, an…
…d remove auto contrast button
- Loading branch information
Showing
10 changed files
with
207 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package debug; | ||
|
||
import net.imagej.ImageJ; | ||
import org.embl.mobie.command.open.OpenImageAndLabelsCommand; | ||
import org.embl.mobie.command.open.OpenMultipleImagesAndLabelsCommand; | ||
|
||
import java.io.File; | ||
|
||
public class DebugIssue1167 | ||
{ | ||
public static void main( String[] args ) | ||
{ | ||
new ImageJ().ui().showUI(); | ||
final OpenImageAndLabelsCommand command = new OpenImageAndLabelsCommand(); | ||
command.image = new File( "/Users/tischer/Desktop/tim-oliver.ome.zarr" ); | ||
command.run(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package develop; | ||
|
||
import bdv.tools.boundingbox.TransformedBoxEditor; | ||
|
||
import javax.swing.*; | ||
import java.awt.*; | ||
import java.awt.event.ItemEvent; | ||
import java.awt.event.ItemListener; | ||
|
||
public class DynamicDialogExample { | ||
public static void main(String[] args) { | ||
// Create the frame | ||
JFrame frame = new JFrame("Conditional TextField Example"); | ||
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | ||
frame.setSize(300, 200); | ||
frame.setLayout(new FlowLayout()); | ||
|
||
// Create the combo box (choice) | ||
String[] choices = {"Select an option", "Show TextField", "Other"}; | ||
JComboBox<String> comboBox = new JComboBox<>(choices); | ||
frame.add(comboBox); | ||
|
||
// Create the text field | ||
JTextField textField = new JTextField(15); | ||
textField.setVisible(false); // Initially hidden | ||
frame.add(textField); | ||
|
||
// Add item listener to the combo box | ||
comboBox.addItemListener(new ItemListener() { | ||
@Override | ||
public void itemStateChanged(ItemEvent e) { | ||
if (e.getStateChange() == ItemEvent.SELECTED) { | ||
String selectedItem = (String) comboBox.getSelectedItem(); | ||
if ("Show TextField".equals(selectedItem)) { | ||
textField.setVisible(true); | ||
} else { | ||
textField.setVisible(false); | ||
} | ||
frame.revalidate(); | ||
frame.repaint(); | ||
} | ||
} | ||
}); | ||
|
||
// Display the frame | ||
frame.setVisible(true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package develop; | ||
|
||
import net.imagej.ImageJ; | ||
import org.embl.mobie.command.open.OpenCollectionTableCommand; | ||
|
||
import java.io.File; | ||
|
||
public class OpenPaoloFirstTable | ||
{ | ||
public static void main( String[] args ) | ||
{ | ||
final ImageJ imageJ = new ImageJ(); | ||
imageJ.ui().showUI(); | ||
|
||
String tablePath = "/Users/tischer/Desktop/Paolo.txt"; | ||
File tableFile = new File( tablePath ); | ||
|
||
OpenCollectionTableCommand command = new OpenCollectionTableCommand(); | ||
command.table = tableFile; | ||
command.run(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package develop; | ||
|
||
import javax.swing.*; | ||
import java.awt.*; | ||
import java.awt.event.ActionEvent; | ||
import java.awt.event.ActionListener; | ||
|
||
public class SimpleDialog { | ||
private JTextField textField; | ||
private boolean isOkPressed; | ||
|
||
public SimpleDialog() { | ||
JDialog dialog = new JDialog((Frame) null, "Simple Dialog", true); | ||
textField = new JTextField(20); | ||
JPanel panel = new JPanel(); | ||
panel.add(new JLabel("Enter something:")); | ||
panel.add(textField); | ||
dialog.add(panel, BorderLayout.CENTER); | ||
|
||
JPanel buttonPanel = new JPanel(); | ||
JButton okButton = new JButton("OK"); | ||
JButton cancelButton = new JButton("Cancel"); | ||
buttonPanel.add(okButton); | ||
buttonPanel.add(cancelButton); | ||
dialog.add(buttonPanel, BorderLayout.SOUTH); | ||
|
||
okButton.addActionListener(new ActionListener() { | ||
public void actionPerformed(ActionEvent e) { | ||
isOkPressed = true; | ||
dialog.setVisible(false); | ||
} | ||
}); | ||
|
||
cancelButton.addActionListener(new ActionListener() { | ||
public void actionPerformed(ActionEvent e) { | ||
isOkPressed = false; | ||
dialog.setVisible(false); | ||
} | ||
}); | ||
|
||
dialog.pack(); | ||
dialog.setVisible( true ); | ||
} | ||
|
||
public boolean isOkPressed() { | ||
return isOkPressed; | ||
} | ||
|
||
public String getInput() { | ||
return textField.getText(); | ||
} | ||
|
||
public static void main(String[] args) { | ||
|
||
SimpleDialog dialog = new SimpleDialog(); | ||
|
||
if (dialog.isOkPressed()) { | ||
System.out.println("User input: " + dialog.getInput()); | ||
} else { | ||
System.out.println("User cancelled the input."); | ||
} | ||
} | ||
} |