00001 /* ImLib3D 00002 * Copyright (c) 2001, ULP-IPB Strasbourg. 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or (at 00007 * your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, but 00010 * WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00017 */ 00018 00020 #include<ImLib3D/Image3D.hpp> 00021 #include<ImLib3D/Vect3D.hpp> 00022 00023 // #ifdef SAFE_DEBUG 00024 // #error SAFE_DEBUG 00025 // #endif 00026 00027 string 00028 Container3D_ReadImageType(const string &fname) 00029 { 00030 if(!ImLib3DFile::IsImLib3DImage(fname)){return "NOT IMLIB3D IMAGE";} 00031 ImLib3DFile file(fname,"r"); 00032 xmlpp::Element *imageNode =file.GetRoot(); 00033 if(imageNode->get_name()=="ImLib3DFileDescription"){imageNode=file.GetChild(imageNode,"ImLib3DImage");} 00034 if(imageNode->get_name()!="ImLib3DImage"){ThrowError("Container3D_ReadImageType: ImLib3DImage node not found");} 00035 return file.GetAttribute(imageNode,"Type" ); 00036 } 00037 00038