/* * Copyright (c) ICG. All rights reserved. * * Institute for Computer Graphics and Vision * Graz, University of Technology / Austria * * * This software is distributed WITHOUT ANY WARRANTY; without even * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the above copyright notices for more information. * * * Project : projects * Module : MIPItkProjects - CommonItkUtilities * Class : $RCSfile$ * Language : C++ * Description : * * Author : Martin Urschler * EMail : urschler@icg.tu-graz.ac.at * Date : $Date$ * Version : $Revision$ * Full Id : $Id$ * */ #ifndef _RAWDATABUFFERIMPORTER_H_ #define _RAWDATABUFFERIMPORTER_H_ #include "itkImage.h" #ifdef VCL_WIN32 #pragma warning(disable:4786) #endif #define _DIMENSION_ 3 template< typename TPixelDataType > class RawDataBufferImporter { public: typedef itk::Image< TPixelDataType, _DIMENSION_ > ImportImageType; typedef typename ImportImageType::Pointer ImportImageTypePointer; // this method assumes that the provider of the buffer_ptr will take care // of deletion! static ImportImageTypePointer import( TPixelDataType * buffer_ptr, int nb_slices, int nb_rows, int nb_colums, float slice_distance, float inplane_voxelsize_x, float inplane_voxelsize_y ); // this method assumes that the provider of the buffer_ptr will take care // of deletion! static ImportImageTypePointer import( TPixelDataType * buffer_ptr, const ImportImageTypePointer& existing_image ); private: RawDataBufferImporter(); ~RawDataBufferImporter(); }; #endif // _RAWDATABUFFERIMPORTER_H_