CIVA UT Data Import Developer Guide
CIVA UT Data Import Developer Guide
2 DLL implementation 4
4 Debugging 8
4.1 Debugging out of CIVA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4.2 Debugging in CIVA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5 Annex 10
5.1 Skew and refraction angles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.2 Optional methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.3 String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.4 Signals and peaks import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
The role of this DLL is to provide all information to convert your UT Data Format to a CIVA native
format. Writing the CIVA native format file is managed by the executable ImportUTDataFile[32|64].exe.
− SampleImportPluginDllProject.sln
Visual C++ solution to start your project (compatible with Visual Studio 2010 and later
versions).
− PluginDataImporter.h
Header file composed of the definitions of all methods and types required for the plugin to
work.
− SampleDataImport.c
Simple implementation of the PluginDataImporter. You can start with this example and
change each function according to your own format. This example is based on a trivial
format (see File.sample). The structure of this file is as follows :
• First line (header) : number of increments, number of scannings, number of
sequences, number of shots, and number of samples in a signal,
• Content : signal values.
1 <? xml version ="1.0" encoding =" ISO -8859 -1" standalone =" no " ? >
2
3 < FilesDesc >
4 < listFileDesc >
5 < FileDesc >
6 < extension >
7 [ extension1 ]
8 </ e x t e n s i o n >
9 < isDirectory >
10 [ isDirectory1 ]
11 </ i s D i r e c t o r y >
12 </ F i l e D e s c >
13 < FileDesc >
14 < extension >
15 [ extension2 ]
16 </ e x t e n s i o n >
17 < isDirectory >
18 [ isDirectory2 ]
19 </ i s D i r e c t o r y >
20 </ F i l e D e s c >
21 [ ... ]
22 </ l i s t F i l e D e s c >
23 < description >
24 [ P l u g i n N a m e ] Files (*. [ e x t e n s i o n 1 ] , *. [ e x t e n s i o n 2 ] , ...)
25 </ d e s c r i p t i o n >
26 </ F i l e s D e s c >
− [extension1] : the first extension compatible with the plugin (for example civa),
− [extension2] : your plugin might be able to read several format, in this case list all the
compatible extensions through <extension/>,
− [isDirectory1] is false if the input is a file and true if the input is a directory,
− [PluginName] Files (*.[extension1], *.[extension2], ...) : a suggestion of de-
scription, where [PluginName] is the name of the plugin. This description will be shown in
the file chooser of CIVA.
1 <? xml version ="1.0" encoding =" ISO -8859 -1" standalone =" no " ? >
2
3 <! DOCTYPE DescPlugIn PUBLIC " -// fr . cea // DTD descplugin . resources . dtd . DescPlugIn // FR
" " DescPlugIn . dtd " >
4
5 < D e s c P l u g I n Auteur =" CEA " withGUI =" true " Type =" I mp or t UT Ac qF i le " Nom =" [ P l u g i n N a m e ] "
Version ="0" >
6 < Lanceur LigneCommande ="% PLUGIN_FOLDER %\ [ P l u g i n N a m e ] . plugin \ [ P l u g i n N a m e ] . bat " / >
7 < DescIHM keyDescIHM =" KeyDescIHM " / >
8 < Option tagOption =" TESTMODEL " value =" true " / >
9 < Option tagOption =" DEBUG " value =" false " / >
10 </ D e s c P l u g I n >
[PluginName].bat is the batch that effectively launches the import process (described below).
The [args] are optional. They are collected by ImportUTDataFile[32|64].exe, and passed as
they stand to the last argument of before() method, if implemented in the DLL.
We suggest locating the DLL in the plugin directory, but it is not mandatory.
Select a file, click Open: the import process of your file should be launched.
If you want to debug your DLL, you can parameterize the command and arguments in the Visual
Studio Project Properties (Configuration Properties -> Debugging) as follows :
− Command: [CivaPlugInDir]/ImportUTDataFile/bin/ImportUTDataFile[32|64]D.exe (D
standing for Debug),
− Command Arguments:
[ArgsDir]\[PluginName].properties
[ArgsDir]\[PluginName].ihm
[ArgsDir]\result\[PluginName].result
[ [ArgsDir]\[PluginName].properties ] (only in model testing mode)
[PluginDllPath]
These properties, ihm and result files are generated by CIVA when it invokes the plugin. Out of
CIVA, you can create them easily :
[PluginName].properties
1 DEBUG = false
2 TESTMODEL = [ true | false ]
[PluginName].ihm
[PluginName].result
Once Visual Studio is configured, you can set breakpoints, and launch the plugin (F5).
The DLL used to debug your plugin has to be generated in Debug Mode in Visual Studio (as opposed
to the Release Mode).
You can now open the file to import in CIVA (see Section 3.5 page 7). You should see this dialog
opening when the import starts :
The importUTDataFile executable sleeps as long as this dialog remains open. You can then attach
a debugger to the executable (in Visual Studio, the debugger can be attached to a process with
Tools -> Attach to process...).
In the new system, (x~0 , y~0 , ~z), a rotation of refraction ◦ is applied on ~z around the y~0 axis. The
resulting vector (the red arrow) is the vector of the raypath.
5.3 String
Several methods allow providing strings:
− getPluginNameLength(), getPluginName()
− getPluginAPIVersionLength(), getPluginAPIVersion(),
− getSalvoNameLength(), getSalvoName()
− getGateNameLength(), getGateName()
This information can be used to optimize the data access. More precisely:
− to import peaks, for each sequence, and for each shot, CIVA imports the CScan of ampli-
tudes (method loadPeaksCScanAmp()) and the CScan of TOF (Time Of Flight) (method
loadPeaksCScanTOF())
− to import signals, CIVA firstly estimates the size of a BScan (scanningCount * sampleCount
* sizeof(float)):
• If CIVA decides to allocate this amount of memory, CIVA will proceed as following:
for each sequence, for each shot, and for each increment, CIVA imports the BScan of
amplitudes (method loadSignalsBScan()).
• otherwise, the import will be done AScan by AScan: for each sequence, for each shot,
for each increment, and for each scanning, CIVA imports the AScan of amplitudes
(method loadSignalAScan()).