Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

diskraw.cpp

Go to the documentation of this file.
00001 // $Id: diskraw.cpp,v 1.2 2003/02/07 02:41:22 sarang Exp $
00002 //
00003 // OpenVL - A Library for working with volumetric datasets.
00004 //          http://openvl.sf.net
00005 //
00006 // Copyright (C) 2003  Sarang Lakare <sarang#users.sf.net>
00007 //
00008 // This library is free software; you can redistribute it and/or
00009 // modify it under the terms of the GNU Library General Public
00010 // License as published by the Free Software Foundation; either
00011 // version 2 of the License, or (at your option) any later version.
00012 //
00013 // This library is distributed in the hope that it will be useful,
00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016 // Library General Public License for more details.
00017 //
00018 // You should have received a copy of the GNU Library General Public
00019 // License along with this library; if not, write to the Free Software
00020 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00021 // USA.
00022 //
00023 // Please report all bugs and problems to openvl-devel@lists.sf.net or
00024 // at the OpenVL website.
00025 //
00026 
00027 #include <iostream>
00028 #include "vlvolume.h"
00029 #include "vlvoldata_diskraw.h"
00030 #include "vlgenericfactory.h"
00031 #include "diskraw.h"
00032 
00033 typedef vlGenericFactory<vlVolDataDiskRawPlugin> vlVolDataDiskRawPluginFactory;
00034 VL_EXPORT_COMPONENT_FACTORY( diskraw, vlVolDataDiskRawPluginFactory );
00035 
00039 vlVolDataDiskRawPlugin::vlVolDataDiskRawPlugin()
00040 {
00041   infoRef().setVersion(0, 0, 1);
00042   infoRef().setName("DiskRawLayout");
00043   infoRef().setService("DiskRaw", "Disk based raw volume layout");
00044   infoRef().addAuthor("Sarang Lakare");
00045   infoRef().setCopyrightText("2003 Sarang Lakare");
00046 }
00047 
00048 
00052 vlVolDataDiskRawPlugin::~vlVolDataDiskRawPlugin()
00053 {
00054 }
00055 
00056 vlLayoutType vlVolDataDiskRawPlugin::layoutType() const
00057 {
00058   return (LayoutType);
00059 }
00060 
00061 vlVolData * vlVolDataDiskRawPlugin::getLayout(const vlDataType & datatype, const vlDim & dim,
00062                                          const vlUnit & units)
00063 {
00064   vlVolData * ret;
00065   callFunctionOnDataType(datatype, ret, getLayoutT, dim, units);
00066   return (ret);
00067 }
00068 
00069 
00070 template <class DataType>
00071 vlVolData * vlVolDataDiskRawPlugin::getLayoutT(DataType & dummy, const vlDim & dim,
00072                                           const vlUnit & units)
00073 {
00074   vlVolDataLayout<DataType,LayoutType>* layout =
00075                                 new vlVolDataLayout<DataType,LayoutType>(dim, units);
00076   return (layout);
00077 }
00078 
00079 
00080 vlVolIterSuperBase * vlVolDataDiskRawPlugin::getIter(vlVolume * vol)
00081 {
00082   vlVolIterSuperBase *iter;
00083   callFunctionOnDataType(vol->dataType(), iter, getIterT, vol);
00084   return (iter);
00085 }
00086 
00087 vlVolIterSuperBase * vlVolDataDiskRawPlugin::getConstIter(const vlVolume * vol)
00088 {
00089   vlVolIterSuperBase *iter;
00090   callFunctionOnDataType(vol->dataType(), iter, getConstIterT, vol);
00091   return (iter);
00092 }
00093 
00094 template <class DataType>
00095 vlVolIterSuperBase * vlVolDataDiskRawPlugin::getIterT(DataType & dummy, vlVolume *vol)
00096 {
00097   //vlVolIterSuperBase *iter = new vlVolIter<DataType, LayoutType>(vol);
00098   //return (iter);
00099   return (0L);
00100 }
00101 
00102 
00103 template <class DataType>
00104 vlVolIterSuperBase * vlVolDataDiskRawPlugin::getConstIterT(DataType & dummy, const vlVolume *vol)
00105 {
00106   //vlVolIterSuperBase *iter = new vlVolIterConst<DataType, LayoutType>(vol);
00107   //return (iter);
00108   return (0L);
00109 }
00110 
00111 
00112 

Generated on Fri Mar 18 11:33:12 2005 for OpenVL by doxygen 1.3.3