Skip to content
Snippets Groups Projects
Verified Commit 9d7a8e0d authored by philippe.verley_ird.fr's avatar philippe.verley_ird.fr Committed by philippe.verley_ird.fr
Browse files

Temporarily disabled automatic cropping since it is not working.

parent 878cb6de
No related branches found
No related tags found
No related merge requests found
......@@ -51,6 +51,10 @@ public class VoxelSpaceCroppingFrameController implements Initializable {
private File voxelFile;
@FXML
private Button helpButtonCropping;
@FXML
private HelpButtonController helpButtonCroppingController;
@FXML
private GridPane manualCropGridPane;
@FXML
......@@ -72,9 +76,9 @@ public class VoxelSpaceCroppingFrameController implements Initializable {
@FXML
private Spinner<Integer> spinnerEnterKMax;
@FXML
private Button saveButton;
private Button cropButton;
@FXML
private Button saveAsButton;
private Button cropAsButton;
@Override
public void initialize(URL url, ResourceBundle rb) {
......@@ -102,10 +106,16 @@ public class VoxelSpaceCroppingFrameController implements Initializable {
manualCropGridPane.disableProperty().bind(manualCropRadioButton.selectedProperty().not());
BooleanBinding voxelFileDefined = Bindings.isEmpty(textfieldInputVoxelFile.textProperty());
saveButton.disableProperty().bind(voxelFileDefined);
saveAsButton.disableProperty().bind(voxelFileDefined);
cropButton.disableProperty().bind(voxelFileDefined);
cropAsButton.disableProperty().bind(voxelFileDefined);
manualCropRadioButton.disableProperty().bind(voxelFileDefined);
autoCropRadioButton.disableProperty().bind(voxelFileDefined);
// automatic cropping not working yet
//autoCropRadioButton.disableProperty().bind(voxelFileDefined);
helpButtonCropping.setOnAction((ActionEvent event)
-> {
helpButtonCroppingController.showHelpDialog(rb.getString("help_cropping"));
});
}
@FXML
......@@ -139,13 +149,13 @@ public class VoxelSpaceCroppingFrameController implements Initializable {
}
@FXML
private void onActionButtonSave(ActionEvent event) {
private void onActionButtonCrop(ActionEvent event) {
// overwrite voxel file
crop(voxelFile, voxelFile);
}
@FXML
private void onActionButtonSaveAs(ActionEvent event) {
private void onActionButtonCropAs(ActionEvent event) {
fcOutputFile.fc.setInitialDirectory(voxelFile.getParentFile());
fcOutputFile.fc.setInitialFileName(voxelFile.getName());
......
......@@ -32,8 +32,8 @@
<fx:define>
<ToggleGroup fx:id="cropToggleGroup" />
</fx:define>
<RadioButton fx:id="autoCropRadioButton" text="Automatic" toggleGroup="$cropToggleGroup" selected="true" />
<RadioButton fx:id="manualCropRadioButton" text="Manual " toggleGroup="$cropToggleGroup" />
<RadioButton fx:id="autoCropRadioButton" text="Automatic" toggleGroup="$cropToggleGroup" disable="true" />
<RadioButton fx:id="manualCropRadioButton" text="Manual " toggleGroup="$cropToggleGroup" selected="true" />
<fx:include fx:id="helpButtonCropping" source="HelpButton.fxml" />
</children>
</HBox>
......@@ -58,8 +58,8 @@
</GridPane>
<HBox spacing="10.0">
<children>
<Button fx:id="saveButton" mnemonicParsing="false" onAction="#onActionButtonSave" text="Save" />
<Button fx:id="saveAsButton" mnemonicParsing="false" onAction="#onActionButtonSaveAs" text="Save as..." />
<Button fx:id="cropButton" mnemonicParsing="false" onAction="#onActionButtonCrop" text="Crop" />
<Button fx:id="cropAsButton" mnemonicParsing="false" onAction="#onActionButtonCropAs" text="Crop as..." />
</children>
</HBox>
</children>
......
......@@ -62,4 +62,8 @@ help_weighting_rank=Energy attenuation model along a shot with multiple echoes.
* 1st line quantifies energy attenuation for a shot with single echo.\n\
* 2nd line quantifies energy attenuation for a shot with two echoes.\n\
* etc.\n\
Default values assume that energy is evenly absorbed by echoes.
\ No newline at end of file
Default values assume that energy is evenly absorbed by echoes.
help_cropping=Voxel space file cropping.\n\
Automatic cropping not working yet (crop to sampled voxels only).\n\
Manual cropping: crop voxel space to specified dimensions.\n\
Beware, Crop button overwrites original voxel space.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment