source: trunk/packages/vizservers/nanovis/NvZincBlendeReconstructor.h @ 3464

Last change on this file since 3464 was 3177, checked in by mmc, 12 years ago

Updated all of the copyright notices to reference the transfer to
the new HUBzero Foundation, LLC.

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