source: nanovis/trunk/ZincBlendeReconstructor.h @ 4895

Last change on this file since 4895 was 4894, checked in by ldelgass, 5 years ago

sync with release branch

  • Property svn:eol-style set to native
File size: 2.3 KB
RevLine 
[2798]1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
[601]2/**
[3502]3 * Copyright (c) 2004-2013  HUBzero Foundation, LLC
[601]4 *
[3611]5 * Authors:
6 *   Insoo Woo <iwoo@purdue.edu>
[601]7 */
[2884]8#ifndef NV_ZINC_BLENDE_RECONSTRUCTOR_H
9#define NV_ZINC_BLENDE_RECONSTRUCTOR_H
[601]10
[4894]11#include <istream>
[601]12
[3492]13#include <vrmath/Vector3f.h>
[601]14
[3611]15namespace nv {
16
[601]17class ZincBlendeVolume;
18
[3611]19class ZincBlendeReconstructor
[2822]20{
21public:
[601]22    /**
23     * @brief Load Zinc blende binary volume data and create ZincBlendeVolume with the file
24     * @param fileName Zinc blende file name, which data is generated by NEMO-3D
25     */
[2844]26    ZincBlendeVolume *loadFromFile(const char *fileName);
[601]27
28    /**
[617]29     * @brief Load Zinc blende binary volume data and create ZincBlendeVolume with the file
[2877]30     * @param stream Zinc blende binary volume data, which data is generated by NEMO-3D and transferred from nanoscale
[617]31     */
[2822]32    ZincBlendeVolume *loadFromStream(std::istream& stream);
[2844]33
[4063]34    ZincBlendeVolume *loadFromMemory(const void *dataBlock);
[617]35
36    /**
[601]37     * @brief Create ZincBlendVolume with output data of NEMO-3D
38     * @param origin the start position of the volume data
39     * @param delta  the delta value among atoms
40     * @param width  the width of unit cells in the data
41     * @param height the height of unit cells in the data
42     * @param depth  the depth of unit cells in the data
43     * @param data the memory block of output data of NEMO-3D
44     */
[3492]45    ZincBlendeVolume *buildUp(const vrmath::Vector3f& origin, const vrmath::Vector3f& delta,
[2822]46                              int width, int height, int depth, void *data);
[2844]47
[3492]48    ZincBlendeVolume *buildUp(const vrmath::Vector3f& origin, const vrmath::Vector3f& delta,
[2822]49                              int width, int height, int depth,
50                              int datacount, double emptyvalue, void *data);
[2844]51
52    /**
53     * @brief Return a singleton instance
54     */
[3611]55    static ZincBlendeReconstructor *getInstance();
[2844]56
57private:
[3611]58    ZincBlendeReconstructor();
[2844]59
[3611]60    ~ZincBlendeReconstructor();
[2844]61
62    /**
63     * @brief Get a line from file. It is used for reading header because header is written in ascii.
64     */
65    void getLine(std::istream& stream);
[4063]66    void getLine(const unsigned char*& stream);
[2844]67
[4063]68    char _buff[255];
[2844]69
70    /// A ZincBlendeReconstructor Singleton instance
[3611]71    static ZincBlendeReconstructor *_instance;
[601]72};
73
[3611]74}
75
[601]76#endif
Note: See TracBrowser for help on using the repository browser.