Trying to import Ophir Spiricon *.bgData file from BeamGage

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
mal
Reply | Threaded
Open this post in threaded view
|

Trying to import Ophir Spiricon *.bgData file from BeamGage

mal
We took some field-test video using an Ophir Spiricon SP620u laser beam profiling camera.  I am now going back and analyzing the images, trying to get the relevant data out.  The camera comes with the awful BeamGage software.  I am frustrated with the clunky behavior and puzzling bugs in BeamGage.

I am trying to use ImageJ to analyze the data for the report we are writing.  I used the "File> Import > Raw" and after playing around I found these options to work pretty well:

Width:  1600
Height:  1200
Offset to first image:  3539824
Gap between images:  18368
Little Endian

The problem comes with the gap between images.  Between frame 8 and 9 the gap increases by 416 bytes, then goes back to the previous gap size.  Similar jumps occur just before frame 14, 18, 20, 22, 26, 30, 34, 38, 42, 43, 47, 54, 59, 64, 68, 72, 76, 80, 84, 86, 88, 92, and 96.  Since I don't have any files with more than 100 frames I didn't go any higher.  

Further, the jumps in inter-frame gap are not the same.  For most of them the extra amount is 248 bytes, but for frame 20 it is 152 extra bytes, for frame 42 it is 296 bytes, and for frame 86 it is 696 bytes.  Has anyone ever seen such strange behavior in any other file format?  It seems like Spiricon is intentionally adding garbage bits to prevent easy handling - making the file size larger and increasing bandwidth requirements in the process.  Gives me another reason to dislike BeamGage.

Anyway, it looks like I will have to write some type of import plugin for *.bgData files, as a search turned up nothing current.  I found some general tutorials for writing ImageJ plugins.  Is there any specific documents dealing with writing file import plug-ins that people recommend?

Second, in the past I've done a little bit of Java programming using both Netbeans and Eclipse, though both are pretty rusty for me right now.  I've also used Jedit for general text processing.  For writing a file import plugin would people recommend using something relatively simple like Jedit or go to a more full-featured IDE like Netbeans or Eclipse?  Finally, from searching it seems like there is a slight preference for using Netbeans to develop for ImageJ.  Is this still the case?
 
Thank you very much for your help.  Sorry if this is too wordy.

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Trying to import Ophir Spiricon *.bgData file from BeamGage

ctrueden
Hi Dr. L,

> Has anyone ever seen such strange behavior in any other file format?

Definitely. Over the course of developing Bio-Formats [1] we have seen many
similar sorts of things, and much worse too. :-)

The planar offsets are most likely stored either in a master header at the
beginning, or daisy chained in a linked list of planar headers. If you can
determine how they are stored, the variable offsets should no longer be a
problem.

If you would be willing to send one or more bgData files to the Bio-Formats
team (you can use the Help > Upload Sample Image feature of Fiji), we would
be happy to investigate adding support for the file format, although we
cannot promise a particular time frame.

> Is there any specific documents dealing with writing file import
> plug-ins that people recommend?

Albert Cardona has written just such a tutorial [2].

That said, I would personally recommend creating a Bio-Formats file reader
instead [3], rather than a plugin specific to ImageJ, since it would be
more broadly useful in a variety of applications [4].

> For writing a file import plugin would people recommend using
> something relatively simple like Jedit or go to a more full-featured
> IDE like Netbeans or Eclipse?

Personally I use Eclipse, but there are several great choices: Eclipse,
NetBeans and IntelliJ IDEA to name a few. For simple projects it is largely
a matter of taste. IDEs provide quite a few features that are very handy
for learning a Java library's API. Auto-completion in particular
(Ctrl+space) is incredibly useful for quickly browsing the API in a
context-sensitive way.

One nice thing is that both ImageJ and Bio-Formats are structured as Maven
projects, so you can very easily import them into your favorite IDE and go
to town. Just clone the desired Git repository [5, 6], then open the
project (in NetBeans or IntelliJ: File > Open Project...; or in Eclipse:
File > Import... > Existing Maven Projects).

Regards,
Curtis

[1]: http://loci.wisc.edu/software/bio-formats
[2]: http://albert.rierol.net/imagej_programming_tutorials.html#How to
integrate a new file format reader and writer
[3]:
https://github.com/openmicroscopy/bioformats/blob/develop/components/bio-formats/doc/reader-guide.txt
[4]: http://loci.wisc.edu/bio-formats/applications
[5]: https://github.com/fiji/ImageJA
[6]: https://github.com/openmicroscopy/bioformats


On Thu, Oct 11, 2012 at 10:21 AM, Dr L <[hidden email]> wrote:

> We took some field-test video using an Ophir Spiricon SP620u laser beam
> profiling camera.  I am now going back and analyzing the images, trying to
> get the relevant data out.  The camera comes with the awful BeamGage
> software.  I am frustrated with the clunky behavior and puzzling bugs in
> BeamGage.
>
> I am trying to use ImageJ to analyze the data for the report we are
> writing.  I used the "File> Import > Raw" and after playing around I found
> these options to work pretty well:
>
> Width:  1600
> Height:  1200
> Offset to first image:  3539824
> Gap between images:  18368
> Little Endian
>
> The problem comes with the gap between images.  Between frame 8 and 9 the
> gap increases by 416 bytes, then goes back to the previous gap size.
>  Similar jumps occur just before frame 14, 18, 20, 22, 26, 30, 34, 38, 42,
> 43, 47, 54, 59, 64, 68, 72, 76, 80, 84, 86, 88, 92, and 96.  Since I don't
> have any files with more than 100 frames I didn't go any higher.
>
> Further, the jumps in inter-frame gap are not the same.  For most of them
> the extra amount is 248 bytes, but for frame 20 it is 152 extra bytes, for
> frame 42 it is 296 bytes, and for frame 86 it is 696 bytes.  Has anyone
> ever seen such strange behavior in any other file format?  It seems like
> Spiricon is intentionally adding garbage bits to prevent easy handling -
> making the file size larger and increasing bandwidth requirements in the
> process.  Gives me another reason to dislike BeamGage.
>
> Anyway, it looks like I will have to write some type of import plugin for
> *.bgData files, as a search turned up nothing current.  I found some
> general tutorials for writing ImageJ plugins.  Is there any specific
> documents dealing with writing file import plug-ins that people recommend?
>
> Second, in the past I've done a little bit of Java programming using both
> Netbeans and Eclipse, though both are pretty rusty for me right now.  I've
> also used Jedit for general text processing.  For writing a file import
> plugin would people recommend using something relatively simple like Jedit
> or go to a more full-featured IDE like Netbeans or Eclipse?  Finally, from
> searching it seems like there is a slight preference for using Netbeans to
> develop for ImageJ.  Is this still the case?
>
> Thank you very much for your help.  Sorry if this is too wordy.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html