当前位置: 首页>>代码示例>>Java>>正文


Java SpimDataException.printStackTrace方法代码示例

本文整理汇总了Java中mpicbg.spim.data.SpimDataException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java SpimDataException.printStackTrace方法的具体用法?Java SpimDataException.printStackTrace怎么用?Java SpimDataException.printStackTrace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mpicbg.spim.data.SpimDataException的用法示例。


在下文中一共展示了SpimDataException.printStackTrace方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: load

import mpicbg.spim.data.SpimDataException; //导入方法依赖的package包/类
@SuppressWarnings( "unchecked" )
@Override
public SpimDataMinimal[] load()
{
	SpimDataMinimal spimData = null;
	try
	{
		spimData = new XmlIoSpimDataMinimal().load( xmlPath );

		if ( WrapBasicImgLoader.wrapImgLoaderIfNecessary( spimData ) )
		{
			System.err.println( "WARNING:\nOpening <SpimData> dataset that is not suited for interactive browsing.\nConsider resaving as HDF5 for better performance." );
		}

	}
	catch ( final SpimDataException e )
	{
		e.printStackTrace();
	}

	return new SpimDataMinimal[]{ spimData };
}
 
开发者ID:saalfeldlab,项目名称:bigwarp,代码行数:23,代码来源:XMLLoader.java

示例2: finish

import mpicbg.spim.data.SpimDataException; //导入方法依赖的package包/类
@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;
	}
}
 
开发者ID:fiji,项目名称:SPIM_Registration,代码行数:22,代码来源:ExportSpimData2HDF5.java

示例3: finish

import mpicbg.spim.data.SpimDataException; //导入方法依赖的package包/类
@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;
	}
}
 
开发者ID:fiji,项目名称:SPIM_Registration,代码行数:22,代码来源:ExportSpimData2TIFF.java

示例4: saveXML

import mpicbg.spim.data.SpimDataException; //导入方法依赖的package包/类
@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();
	}
}
 
开发者ID:PreibischLab,项目名称:BigStitcher,代码行数:34,代码来源:StitchingExplorerPanel.java

示例5: saveXML

import mpicbg.spim.data.SpimDataException; //导入方法依赖的package包/类
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();
	}
}
 
开发者ID:fiji,项目名称:SPIM_Registration,代码行数:41,代码来源:ViewSetupExplorerPanel.java

示例6: run

import mpicbg.spim.data.SpimDataException; //导入方法依赖的package包/类
@Override
public void run( final String arg )
{
	if ( IJ.versionLessThan( "1.40" ) ) return;

       final int[] ids = WindowManager.getIDList();
       if ( ids == null || ids.length < 2 )
       {
           IJ.showMessage( "You should have at least two images open." );
           return;
       }

       // Find any open images
       final String[] titles = new String[ ids.length ];
       for ( int i = 0; i < ids.length; ++i )
       {
           titles[ i ] = ( WindowManager.getImage( ids[ i ] ) ).getTitle();
       }

       // Build a dialog to choose the moving and fixed images
       final GenericDialog gd = new GenericDialog( "Big Warp Setup" );
       gd.addMessage( "Image Selection:" );
       final String current = WindowManager.getCurrentImage().getTitle();
       gd.addChoice( "moving_image", titles, current );
       gd.addChoice( "target_image", titles, current.equals( titles[ 0 ] ) ? titles[ 1 ] : titles[ 0 ] );
       gd.showDialog();

       if (gd.wasCanceled()) return;

       moving_imp = WindowManager.getImage( ids[ gd.getNextChoiceIndex() ] );
       target_imp = WindowManager.getImage( ids[ gd.getNextChoiceIndex() ] );

       try
       {
       	new RepeatingReleasedEventsFixer().install();
		final BigWarp bw = new BigWarp( BigWarpInit.createBigWarpDataFromImages( moving_imp, target_imp ), "Big Warp",  null );
		bw.getViewerFrameP().getViewerPanel().requestRepaint();
		bw.getViewerFrameQ().getViewerPanel().requestRepaint();
		bw.getLandmarkFrame().repaint();
	}
       catch (final SpimDataException e)
       {
		e.printStackTrace();
		return;
	}

}
 
开发者ID:saalfeldlab,项目名称:bigwarp,代码行数:48,代码来源:BigWarpImagePlusPlugIn.java

示例7: deploy

import mpicbg.spim.data.SpimDataException; //导入方法依赖的package包/类
private void deploy( final String datasetName, final String fileLocation, final Request baseRequest, final HttpServletResponse response ) throws IOException
{
	LOG.info( "Add new context: " + datasetName );
	final String context = "/" + datasetName;

	boolean alreadyExists = false;
	for ( final Handler handler : server.getChildHandlersByClass( CellHandler.class ) )
	{
		final CellHandler contextHandler = ( CellHandler ) handler;
		if ( context.equals( contextHandler.getContextPath() ) )
		{
			LOG.info( "Context " + datasetName + " already exists.");
			alreadyExists = true;
			break;
		}
	}

	if ( ! alreadyExists )
	{
		CellHandler ctx = null;
		try
		{
			ctx = new CellHandler( baseURL + context + "/", fileLocation, datasetName, thumbnailsDirectoryName );
		}
		catch ( final SpimDataException e )
		{
			LOG.warn( "Failed to create a CellHandler", e );
			e.printStackTrace();
		}
		ctx.setContextPath( context );
		handlers.addHandler( ctx );
	}

	response.setContentType( "text/html" );
	response.setStatus( HttpServletResponse.SC_OK );
	baseRequest.setHandled( true );

	final PrintWriter ow = response.getWriter();
	if ( alreadyExists )
		ow.write( datasetName + " already exists. Not registered." );
	else
		ow.write( datasetName + " registered." );
	ow.close();
}
 
开发者ID:bigdataviewer,项目名称:bigdataviewer-server,代码行数:45,代码来源:ManagerHandler.java

示例8: run

import mpicbg.spim.data.SpimDataException; //导入方法依赖的package包/类
@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 + "'." );
	}
}
 
开发者ID:fiji,项目名称:SPIM_Registration,代码行数:46,代码来源:Resave_TIFF.java


注:本文中的mpicbg.spim.data.SpimDataException.printStackTrace方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。