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 : David Beilloin (Sep 2013) 00022 **=======================================================================*/ 00023 #ifndef _SO_IMAGE_DATA_ADAPTER_H_ 00024 #define _SO_IMAGE_DATA_ADAPTER_H_ 00025 00026 #include <ImageViz/SoImageViz.h> 00027 #include <Inventor/fields/SoFieldContainer.h> 00028 #include <Inventor/SbVec.h> 00029 #include <Inventor/SbBox.h> 00030 #include <ImageViz/SbImageDataType.h> 00031 #include <ImageViz/SbChannelList.h> 00032 #include <Inventor/SbPImpl.h> 00033 #include <Inventor/fields/SoSFBox3f.h> 00034 #include <ImageViz/SbImageDataAccessor.h> 00035 #include <Inventor/errors/SbException.h> 00036 #include <Inventor/fields/SoSFRotation.h> 00037 #include <Inventor/fields/SoSFEnum.h> 00038 00039 #ifdef _MSC_VER 00040 #pragma warning( push ) 00041 #pragma warning(disable:4251) 00042 #endif 00043 00044 SO_PIMPL_BASE_PUBLIC_DECLARATION(SoImageDataAdapter); 00045 00076 class SoImageDataAdapter : public SoFieldContainer 00077 { 00078 SO_FIELDCONTAINER_ABSTRACT_HEADER(SoImageDataAdapter); 00079 SO_PIMPL_BASE_PUBLIC_HEADER(SoImageDataAdapter); 00080 00081 public: 00092 enum Interpretation 00093 { 00099 VALUE, 00107 LABEL, 00114 BINARY 00115 }; 00116 00128 SoSFEnum interpretation; 00129 00146 SoSFBox3f extent; 00147 00151 SoSFRotation orientation; 00152 00158 virtual Interpretation getInterpretation() const; 00159 00165 virtual void setInterpretation( const Interpretation& interpretation ); 00166 00170 virtual SbImageDataType getImageDataType(); 00171 00178 virtual SbVec4i32 getSize() const; 00179 00184 virtual SbBox3f getExtent() const; 00185 00190 SbVec3f getVoxelSize() const; 00191 00196 void setVoxelSize( const SbVec3f& voxelSize ); 00197 00202 SbVec3f getOrigin() const; 00203 00209 void setOrigin( const SbVec3f& origin ); 00210 00218 void setDirection(const SbVec3f &rowDirection, const SbVec3f &columnsDirection); 00219 00223 SbVec3f getRowDirection() const; 00224 00228 SbVec3f getColumnDirection() const; 00229 00233 SbVec3f getPlaneDirection() const; 00234 00239 SbMatrix getIndexToPhysicalTransformation() const; 00240 00246 SbImageDataAccessor& getDataAccessor(); 00247 00248 private: 00249 00253 virtual void notify( SoNotList* list ); 00254 00256 SoImageDataAdapterImpl* getImpl() const; 00257 00258 private: 00259 00261 virtual ~SoImageDataAdapter(); 00262 00263 private: 00264 // default constructor is not available 00265 SoImageDataAdapter(){} 00266 00269 SbImageDataAccessor m_dataAccessor; 00270 00271 }; 00272 00273 #ifdef _MSC_VER 00274 #pragma warning( pop ) 00275 #endif 00276 00277 #endif /* _SO_IMAGE_DATA_ADAPTER_H_ */ 00278 00279 00280