00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2020 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : Thibaut Andrieu (Jun 2011) 00022 **=======================================================================*/ 00023 00024 #if !defined _SO_VOLUME_WRITER_H_ 00025 #define _SO_VOLUME_WRITER_H_ 00026 00027 #include <Inventor/fields/SoFieldContainer.h> 00028 #include <Inventor/SbString.h> 00029 #include <Inventor/SbBox.h> 00030 #include <Inventor/SbDataType.h> 00031 #include <Inventor/devices/SoBufferObject.h> 00032 #include <Inventor/fields/SoSFString.h> 00033 #include <Inventor/fields/SoSFBox3f.h> 00034 #include <Inventor/fields/SoSFVec3i32.h> 00035 #include <Inventor/fields/SoSFEnum.h> 00036 #include <LDM/SoLDMTileID.h> 00037 00038 class SoVolumeReader; 00039 00143 class SoVolumeWriter : public SoFieldContainer 00144 { 00145 SO_FIELDCONTAINER_ABSTRACT_HEADER(SoVolumeWriter); 00146 00147 public: 00148 00150 SoSFBox3f extent; 00151 00153 SoSFVec3i32 dimension; 00154 00159 SoSFEnum dataType; 00160 00165 SoSFEnum wordFormat; 00166 00168 enum WordFormat { 00169 // Must have same values that SiFileManage::getMachineWordFormat. 00170 // Note: BIG_ENDIAN and LITTLE_ENDIAN are already defined in types.h on linux 00171 // but have not the right values... 00172 WF_BIG_ENDIAN = 0, 00173 WF_LITTLE_ENDIAN = 1 00174 }; 00175 00180 virtual SbBool initialize(); 00181 00188 virtual SbBool closeAllHandles(); 00189 00193 virtual SbBool restoreAllHandles(); 00194 00205 virtual SbBool isDataConverted() const = 0; 00206 00216 virtual SbBool writeTile( const SoLDMTileID& tileId, SoBufferObject* buffer ); 00217 00224 virtual SbBool writeSubSlice( int sliceIndex, const SbBox2i32& subSlice, SoBufferObject* buffer ); 00225 00229 virtual SbBool finish(); 00230 00231 private: 00232 00234 SoVolumeWriter(); 00235 00237 virtual ~SoVolumeWriter(); 00238 }; 00239 00240 #endif // _SO_VOLUME_WRITER_H_ 00241 00242 00243