Skip to content
Snippets Groups Projects
Commit e54e03bd authored by Céline  TREBEAU's avatar Céline TREBEAU
Browse files

code cleanup

parent 9273b9b8
No related branches found
No related tags found
2 merge requests!47Feature : Multi-channel and Binning,!41Resolve "Consider rescaling (binning) large images"
......@@ -194,14 +194,15 @@ public class PreprocessingController< T extends RealType< T > & NativeType< T >
/**
* Finds and sets the input color tables.
*
* @param index the position of the input in the list of displayed datasets
*/
public void setColorTable( int index)
public void setColorTable( int index )
{
ImageDisplayService imageDisplayService = parentController.getMainAppFrame().getImage();
DatasetView datasetView = ( DatasetView ) imageDisplayService.getImageDisplays().get(index).get( 0 );
ArrayList<ColorTable> colorTables = new ArrayList<>(datasetView.getColorTables());
getModel().getColors().set( colorTables );
DatasetView datasetView = ( DatasetView ) imageDisplayService.getImageDisplays().get( index ).get( 0 );
ArrayList< ColorTable > colorTables = new ArrayList<>( datasetView.getColorTables() );
getModel().getColors().set( colorTables );
}
......@@ -252,7 +253,14 @@ public class PreprocessingController< T extends RealType< T > & NativeType< T >
getModel().getChannel().set( channelValue.getValue() - 1 );
}
// Set the input channel
getModel().getInput_channel().set( Views.hyperSlice( getModel().getInput().get(), 2, getModel().getChannel().get() ) );
if ( getModel().getInput().get() == null )
{
showError( new NoInputException() );
}
else
{
getModel().getInput_channel().set( Views.hyperSlice( getModel().getInput().get(), 2, getModel().getChannel().get() ) );
}
}
private void disableParameters()
......@@ -289,7 +297,7 @@ public class PreprocessingController< T extends RealType< T > & NativeType< T >
public void setParameters( ZelligeParameters parameters )
{
binValue.getValueFactory().setValue(parameters.getPretreatmentParameters().getBin());
channelValue.getValueFactory().setValue(parameters.getPretreatmentParameters().getChannel());
binValue.getValueFactory().setValue( parameters.getPretreatmentParameters().getBin() );
channelValue.getValueFactory().setValue( parameters.getPretreatmentParameters().getChannel() );
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment