IMServer:Uploader: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
Line 7: Line 7:


A simple mongo interface is created  
A simple mongo interface is created  
<pre>


<syntaxhighlight lang="c" enclose="pre">
<syntaxhighlight lang="c" enclose="pre">
Line 34: Line 32:


</syntaxhighlight >
</syntaxhighlight >
</pre>




[[category:Connectome]]
[[category:Connectome]]

Revision as of 23:24, 18 January 2011

Image Dicer

Large images are split into multir-esolution representation


Upload to MongoDB

A simple mongo interface is created

<syntaxhighlight lang="c" enclose="pre">

  1. include <iostream>
  2. include <client/dbclient.h>

using namespace std;

class vtkMongoInterface {

   mongo::DBClientConnection conn;

public:

   // Constructor
   vtkMongoInterface()  {}
   // Operations possible
   int connect(const char *server = "127.0.0.1", int port = 27017);
   int insert(const char * name , int num );
   int insert(const char * path, mongo::BSONObj  obj);
   int query();

};

</syntaxhighlight >