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-2019 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 00145 class SoVolumeWriter : public SoFieldContainer 00146 { 00147 SO_FIELDCONTAINER_ABSTRACT_HEADER(SoVolumeWriter); 00148 00149 public: 00150 00152 SoSFBox3f extent; 00153 00155 SoSFVec3i32 dimension; 00156 00161 SoSFEnum dataType; 00162 00167 SoSFEnum wordFormat; 00168 00170 enum WordFormat { 00171 // Must have same values that SiFileManage::getMachineWordFormat. 00172 // Note: BIG_ENDIAN and LITTLE_ENDIAN are already defined in types.h on linux 00173 // but have not the right values... 00174 WF_BIG_ENDIAN = 0, 00175 WF_LITTLE_ENDIAN = 1 00176 }; 00177 00182 virtual SbBool initialize(); 00183 00190 virtual SbBool closeAllHandles(); 00191 00195 virtual SbBool restoreAllHandles(); 00196 00207 virtual SbBool isDataConverted() const = 0; 00208 00218 virtual SbBool writeTile( const SoLDMTileID& tileId, SoBufferObject* buffer ); 00219 00226 virtual SbBool writeSubSlice( int sliceIndex, const SbBox2i32& subSlice, SoBufferObject* buffer ); 00227 00231 virtual SbBool finish(); 00232 00233 private: 00234 00236 SoVolumeWriter(); 00237 00239 virtual ~SoVolumeWriter(); 00240 }; 00241 00242 #endif // _SO_VOLUME_WRITER_H_ 00243 00244 00245