Java Code Examples for mpicbg.spim.data.SpimDataException#printStackTrace()
The following examples show how to use
mpicbg.spim.data.SpimDataException#printStackTrace() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ExportSpimData2HDF5.java From SPIM_Registration with GNU General Public License v2.0 | 6 votes |
@Override public boolean finish() { System.out.println( "finish()" ); String path = params.getSeqFile().getAbsolutePath(); try { new XmlIoSpimData2( "" ).save( spimData, path ); IOFunctions.println( "(" + new Date( System.currentTimeMillis() ) + "): Saved xml '" + path + "'." ); // this spimdata object was not modified, we just wrote a new one return false; } catch ( SpimDataException e ) { IOFunctions.println( "(" + new Date( System.currentTimeMillis() ) + "): Could not save xml '" + path + "'." ); e.printStackTrace(); return false; } }
Example 2
Source File: ExportSpimData2TIFF.java From SPIM_Registration with GNU General Public License v2.0 | 6 votes |
@Override public boolean finish() { XmlIoSpimData2 io = new XmlIoSpimData2( "" ); try { io.save( spimData, new File( params.getXMLFile() ).getAbsolutePath() ); IOFunctions.println( "(" + new Date( System.currentTimeMillis() ) + "): Saved xml '" + io.lastFileName() + "'." ); // this spimdata object was not modified, we just wrote a new one return false; } catch ( SpimDataException e ) { IOFunctions.println( "(" + new Date( System.currentTimeMillis() ) + "): Could not save xml '" + io.lastFileName() + "'." ); e.printStackTrace(); return false; } }
Example 3
Source File: Main.java From 3Dscript with BSD 2-Clause "Simplified" License | 5 votes |
public static void run(File xmlFile) { BDVRenderer renderer; try { renderer = new BDVRenderer(xmlFile); AnimationEditor editor = new AnimationEditor(renderer, Default3DRecordingProvider.getInstance()); editor.setVisible(true); } catch (SpimDataException e) { e.printStackTrace(); IJ.handleException(e); } }
Example 4
Source File: StitchingExplorerPanel.java From BigStitcher with GNU General Public License v2.0 | 5 votes |
@Override public void saveXML() { try { io.save( data, xml ); for ( final SelectedViewDescriptionListener< AS > l : listeners ) l.save(); if ( SpimData2.class.isInstance( data ) ) { final ViewInterestPoints vip = ( (SpimData2) data ).getViewInterestPoints(); for ( final ViewInterestPointLists vipl : vip.getViewInterestPoints().values() ) { for ( final String label : vipl.getHashMap().keySet() ) { final InterestPointList ipl = vipl.getInterestPointList( label ); ipl.saveInterestPoints( false ); ipl.saveCorrespondingInterestPoints( false ); } } } IOFunctions.println( "Saved XML '" + xml + "'." ); } catch ( SpimDataException e ) { IOFunctions.println( "Failed to save XML '" + xml + "': " + e ); e.printStackTrace(); } }
Example 5
Source File: ViewSetupExplorerPanel.java From SPIM_Registration with GNU General Public License v2.0 | 5 votes |
public void saveXML() { try { io.save( data, xml ); for ( final SelectedViewDescriptionListener< AS > l : listeners ) l.save(); if ( SpimData2.class.isInstance( data ) ) { final ViewInterestPoints vip = ( (SpimData2)data ).getViewInterestPoints(); for ( final ViewInterestPointLists vipl : vip.getViewInterestPoints().values() ) { for ( final String label : vipl.getHashMap().keySet() ) { final InterestPointList ipl = vipl.getInterestPointList( label ); if ( ipl.getInterestPoints() == null ) ipl.loadInterestPoints(); ipl.saveInterestPoints(); if ( ipl.getCorrespondingInterestPoints() == null ) ipl.loadCorrespondingInterestPoints(); ipl.saveCorrespondingInterestPoints(); } } } IOFunctions.println( "Saved XML '" + xml + "'." ); } catch ( SpimDataException e ) { IOFunctions.println( "Failed to save XML '" + xml + "': " + e ); e.printStackTrace(); } }
Example 6
Source File: Resave_TIFF.java From SPIM_Registration with GNU General Public License v2.0 | 4 votes |
@Override public void run( final String arg0 ) { final LoadParseQueryXML lpq = new LoadParseQueryXML(); if ( !lpq.queryXML( "Resaving as TIFF", "Resave", true, true, true, true ) ) return; final ProgressWriter progressWriter = new ProgressWriterIJ(); progressWriter.out().println( "starting export..." ); final Parameters params = getParameters(); if ( params == null ) return; final SpimData2 data = lpq.getData(); final List< ViewId > viewIds = SpimData2.getAllViewIdsSorted( data, lpq.getViewSetupsToProcess(), lpq.getTimePointsToProcess() ); // write the TIFF's writeTIFF( data, viewIds, new File( params.xmlFile ).getParent(), params.compress, progressWriter ); // write the XML try { final Pair< SpimData2, List< String > > result = createXMLObject( data, viewIds, params ); progressWriter.setProgress( 0.95 ); // write the XML lpq.getIO().save( result.getA(), new File( params.xmlFile ).getAbsolutePath() ); // copy the interest points if they exist copyInterestPoints( data.getBasePath(), new File( params.xmlFile ).getParentFile(), result.getB() ); } catch ( SpimDataException e ) { IOFunctions.println( "(" + new Date( System.currentTimeMillis() ) + "): Could not save xml '" + params.xmlFile + "'." ); e.printStackTrace(); } finally { progressWriter.setProgress( 1.00 ); IOFunctions.println( "(" + new Date( System.currentTimeMillis() ) + "): Saved xml '" + params.xmlFile + "'." ); } }