Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoLDMWriter.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2018 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : T. DUFOUR (Sep 2007)
22**=======================================================================*/
23
24
25#ifndef _SO_LDM_WRITER_
26#define _SO_LDM_WRITER_
27
28#include <LDM/nodes/SoDataSet.h>
29class SoLDMWriterConverter;
30class SoLDMWriterReader;
32
246{
247 public:
252
256 virtual ~SoLDMWriter();
257
264 void setXmlCallback( void (*xmlCB)( FILE*, void * userData ), void * userData );
265
272 int initialize( const SbString & filename,
273 const SoDataSet & inputVolData,
274 SoConverterParameters* parameters );
275
282 int initialize( const SbString & filename,
283 const SbBox3f & size, const SbVec3i32 & dimension, SoDataSet::DataType dataType,
284 SoConverterParameters* parameters );
285
309 int writeSubVolume( const SbBox3i32 & subVolume, SoBufferObject* data, SbBool doLowerResolution = TRUE, SbBool doOverlappingTiles = TRUE );
310
316 int writeTile( const SbVec3i32 & location, SoBufferObject* data, int resolution = 0 );
317
321 int writeTile( const SoLDMTileID & tileID, SoBufferObject* data );
322
328 int finish( SbBool doMultiResolution = TRUE );
329
330#if 1 SoDEPRECATED
333 int writeSubVolume( const SbBox3i32 & subVolume, const void * data, SbBool doLowerResolution = TRUE, SbBool doOverlappingTiles = TRUE );
334SoDEPRECATED
336 int writeTile( const SbVec3i32 & location, void * data, int resolution = 0 );
337SoDEPRECATED
339 int writeTile( const SoLDMTileID & tileID, void * data );
340
341#endif
343#if 1 SoDEPRECATED
354 int initialize( const SbString & filename,
355 const SoDataSet & inputVolData,
356 int argc = 0, char** argv = NULL );
357SoDEPRECATED
367 int initialize( const SbString & filename,
368 const SbBox3f & size, const SbVec3i32 & dimension, SoDataSet::DataType dataType,
369 int argc = 0, char** argv = NULL );
370
371#endif
373private:
374 // Original declaration - didn't use standard OIV data type - kept for compatibility
375 int finish( bool doMultiResolution )
376 { return finish( (SbBool)doMultiResolution ); }
377
378 void disableWarning(bool flag) { m_warning = flag; };
379
380private:
381 void (*m_xmlCB)( FILE*, void* );
382 void *m_xmlCBUserData;
383
384 bool m_initiated;
385 int m_retCode;
386 SoLDMWriterConverter *m_converter;
387 SoLDMReader* m_reader;
388 void release();
389
390
392 bool init(const SbString & filename);
393
394 int initiateConverter( const SbString & filename, int argc = 0, char** argv = NULL );
395 int initiateConverter( const SbString & filename, SoConverterParameters* parameters );
396
397private:
399 bool m_warning;
400
401};
402
403#endif // _SO_LDM_WRITER_
404
405
3D box class.
Definition SbBox.h:649
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> 3D box class.
Definition SbBox.h:96
Class for smart character strings.
Definition SbString.h:202
3D vector class.
Definition SbVec.h:1517
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Containe...
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Data set...
Definition SoDataSet.h:139
DataType
Supported data type.
Definition SoDataSet.h:624
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Base cla...
Definition SoLDMReader.h:98
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Tile ID
Definition SoLDMTileID.h:63
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Write da...
SoDEPRECATED int writeSubVolume(const SbBox3i32 &subVolume, const void *data, SbBool doLowerResolution=TRUE, SbBool doOverlappingTiles=TRUE)
SoDEPRECATED int writeTile(const SbVec3i32 &location, void *data, int resolution=0)
int initialize(const SbString &filename, const SbBox3f &size, const SbVec3i32 &dimension, SoDataSet::DataType dataType, SoConverterParameters *parameters)
Initializes the writer to build a volume filename with the specified dimensions,...
SoDEPRECATED int initialize(const SbString &filename, const SoDataSet &inputVolData, int argc=0, char **argv=NULL)
Initializes the writer to build a volume with the same dimensions, size and data type as inputVolDat...
int writeTile(const SoLDMTileID &tileID, SoBufferObject *data)
Writes the specified tile tileID into the LDM file.
int writeTile(const SbVec3i32 &location, SoBufferObject *data, int resolution=0)
Writes the tile which includes location in data coordinates, at the specified resolution level,...
int initialize(const SbString &filename, const SoDataSet &inputVolData, SoConverterParameters *parameters)
Initializes the writer to build a volume with the same dimensions, size and data type as inputVolDat...
virtual ~SoLDMWriter()
Destructor.
int finish(SbBool doMultiResolution=TRUE)
Finishes writing the LDM file and optionally invokes the converter to generate the lower resolution t...
void setXmlCallback(void(*xmlCB)(FILE *, void *userData), void *userData)
Specifies the callback that will be called when the LDM file header is generated.
SoDEPRECATED int writeTile(const SoLDMTileID &tileID, void *data)
int writeSubVolume(const SbBox3i32 &subVolume, SoBufferObject *data, SbBool doLowerResolution=TRUE, SbBool doOverlappingTiles=TRUE)
Writes the data contained in the specified subVolume into the LDM file.
SoLDMWriter()
Constructor.
SoDEPRECATED int initialize(const SbString &filename, const SbBox3f &size, const SbVec3i32 &dimension, SoDataSet::DataType dataType, int argc=0, char **argv=NULL)
Initializes the writer to build a volume filename with the specified dimensions,...
int SbBool
Boolean type.
Definition SbBase.h:87