<div dir="ltr"><div><div>Hi! I am sorry for the delay in this updates which is due to last Friday. <br></div>In last week I was working on this point of Oliver's plan: <br><pre>3. Implement an HDF5-based file format for psurface objects
Nobody will be able to use your stuff as long as we rely on the AmiraMesh format.
(The format itself is not a secret, but the support library is difficult to come by).
- AmiraMesh is a general-purpose file format for all kinds of visualization-related
data. Read the file psurface/README to learn how psurface objects are stored in
AmiraMesh files.
- Familiarize yourself with HDF5 (<a href="http://www.hdfgroup.org/HDF5/">http://www.hdfgroup.org/HDF5/</a>) Find a way to
store a psurface object in HDF5 instead of AmiraMesh. Here it is okay to use
the HDF5 support library.
- Implement HDF5 reading and writing in psurface-convert
At this point you will already have achieved quite a few useful things.</pre><br></div><div>My update includes:<br></div><div>1. Adding more information into hdf5 data. <br>
</div><div>After discussing with Markus and reading AmiraMeshIO.cpp again, I realize that I did not store <br>enough data into hdf5 data format. So I add more data into the hdf5 output:<br></div><div>1) Vertices positions<br>
</div><div>2)Triangles index<br>3)numNodesAndEdgesArray(which have local information on planer graph of each triangles)</div><div>4)Node positions( in world coordinate, triangle index and local coordinate)<br></div><div>
5)Node type and Node Number<br>
</div><div>6)Parameter Edges(represented in two ways: with the index of its end points in local index and in global index)<br></div><div>7)Nodes on 3 regular edges of each Triangular<br><br></div><div>2.Write the function that read psurface object from hdf5 file. <br>
</div><div> This is implemented by two functions:<br>1)bool readHdf5Data(const char* filename) <br></div><div>2)bool initFromHDF5(psurface::PSurface<2,ctype>* psurf, const char* filename, psurface::Surface* surf)<br>
1) reads hdf5 file and store the data containing information 1)->7) to vector arrays in class Hdf5IO(I changed the class name Hdf5PWrite to Hdf5IO). 2) construct the psurface object with the vector arrays in Hdf5IO. <br>
</div><div><br></div><div>If you have a look at the code I write, you might find that I stored to much information into hdf5 file. For example, I store<br></div><div>Node position information in both world coordinate and the local coordinate. The local coordinate is needed because we need to read psurface object from the hdf5 file. The world coordinate is needed to display the nodes in paraview. I am not sure is this kinds of information duplication is OK or not. <br>
<br></div><div>I have complete most part of the code and updated the code with the new comment in <a href="https://gitorious.org/gcos/psurface-convert" target="_blank">https://gitorious.org/gcos/psurface-convert</a>(git://<a href="http://gitorious.org/gcos/psurface-convert.git" target="_blank">gitorious.org/gcos/psurface-convert.git</a>) <br>
</div><div>My understanding of the psurface object is like this: The psurface have 3 parts, the original surface P, the target surface S and the mapping F between them. The Mapping is represented by F^-1(S) on P. F^-1m(P) is stored in planar graphs on P. In order to display psurface object, we should display both original surface, planar graphs on surface and the target surface.<span><i><br>
</i></span></div><div><br></div><div>I tested the hdf5 writing code with the 3 example file Oliver sends me before. The first two files could be written to hdf5 file format. But I have some trouble with the last one, with the error message "You're trying to read a file in the old-style AmiraMesh format".<i></i><br>
</div><div>This am file only contains information of base triangles and base vertex. I have not test it with the psuface object with planar graph yet. <br><br>In the pdf file sander_psurface, there is one sentence " In particular, when using PSurface from within Amira (see Section 5), an existing Amira surface object can be used for S2 . A pointer to S2 is then handed to the PSurfaceFactory. At this point, the graph on S1 is the empty graph, i.e., there is no mapping defined anywhere on S1. The actual mapping is specified in a separate step."<br>
</div><div>Does it mean that we could not get any Amiramesh with planar graph? <br><br></div><div>My plan for this week is:<br></div><div>1) Solve the undefined reference error<br></div><div>2) Continue working on hdf5 write and reading code until it works.<br>
</div><div><br></div><div>Currently I have some problem posting blogs due to the Chinese net block police. I will ask my friends to help me post it when he is available. <br><br></div><div>Best,<br></div><div>Xiaoxue<br>
</div><div><br><br></div>
</div>