Getting ready to import some hardware

We guys at our company decided to import a piece of hardware to understand, learn and generally play around with. The decision to import was made when all vendors in India told us that they dont have it with them. Anyways, once the decision was made we were made to understand the procedure in making some imports.

a) First one should apply for an import/export code at DGFT, Kendriya Sadan, Koramangala. This would take a couple of days (dont know how much time it would actually take, cause we dont have the IE code yet).

b) Then we need to get a profarma invoice from the US vendor and release a formal purchase order from our side. We will need to take both of these documents and show it to our bank so that they authorize an international wire transfer.

c) Next we take the bank’s authorization and get to the Foreign Exchange branch of our bank and initiate the wire transfer. Again to this FE Branch, we should show like 4-5 documents and explain our purpose/intent behind the import.

d) The US vendor will then get the money. They will then despatch the hardware to India by Air Cargo. Then this will land up at the customs office in Bangalore sometime next month.

e) We will then have to take all the documents generated between a and d and show it to the customs officials, pay the customs duties and get the hardware.

Provided there is no bribe and harrassment involved in all this process, we can hope to get our stuff in about a month’s time. Otherwise it may take a couple of months. So far we have not been asked for bribe from any government official, they have all been very kind and very helpful so far. But you never know. Like they say, there is a first time to everything.

VTK Designer 2: Evaluating a Center Line in a Tunnel

I was reading a bunch of materials on center line algorithms. These algorithms essentially evaluate a line that passes through the center of a tunnel. Most of the algorithms that I was reading works on 3D Image data sets, I was searching for something that works on a polygonal model of a 3D Tunnel. So I though of doing some experimentation myself.

VTK Designer 2 turned out to be a great tool!!. I could not only write my algorithm in ECMA script, but also test it, animate it and validate my logic.

After constructing this network

and writing this script

I could see this movie. (Click on the image below to see the movie in Google Videos).

I do admit that the results are not smack down accurate, but I am quite excited about the nature of development “VTK Designer 2” supports.

A Side Note: “VTK Designer 2” is 80,000+ lines of code as of today. Lots more to go before we can make a decent release in October.

Object and Signal/Slot Explorer for Qt

I was searching on the net for a Qt Object Explorer that would help me to understand large software and that would help others to understand software that I write. But I could not find one, also it turns out that quite a few people are searching for one. A brief search in Qt’s mailing list would prove that some people want an object explorer.

While exploring parent/child relationships and object trees was easy, figuring out signal slot connections were tricky. After some basic code hunting and some hacks here and there, I was able to write an object explorer.

I then packaged it as a component and dropped it into VTK Designer, and the result was quite impressive.

The usage sematics is like this
a) Go to the Object Explorer tab
b) Clock on the “Interactive” check box.
c) Click on any widget whose connections and parent/child relationships you want to explore.
d) Click on any connection in the connections tab and the object explorer shows the connection for you 🙂

I will blog about the actual implementation sometime this weekend. I am sure it would help quite a few developers out there, it sure did help me.

I am India

I am India
I am India” on Google Video
Nice video 🙂

This film is a journey through emerging India,” the fastest growing free market democracy in the world”. It celebrates the relentless spirit of the people of India, who through their karma give it a place amongst the leading economic nations of the world.
Conceived and produced by Bharatbala Productions (BBP) for India Band Equity Foundation (IBEF).

VTK Designer 2.0 Videos

I uploaded some “VTK Designer 2” videos to Google Videos today. I have aggregated them in this blog entry. I am quite happy about the way VTK Designer 2 has turned out. Hopefully the users will like it better and adopt it more when we release it in October 2007. (Fingers Crossed)

[Clicking on the images below will take you to the corresponding Google Videos page]

This video shows how VTK Designer 2 can be used to construct a simple cone source visualization pipeline. It also shows how VTK Designer’s scripting capabilities can be made use of to animate the visualization.

This video shows how VTK Designer 2 can be used to visualization terrain images.

This video builds upon “VTK Designer 2 : Simple Terrain Visualization”. It starts from where the previous video left off. It shows how you can include more user interface into VTK Designer and script the new user interfaces in VTK Designer.

[Note: I wanted to show color mapping in this example, but was not able include it in the video. I hope to show it in another video sometime soon]

This video shows a preview of the Generic Component Framework used in VTK Designer. In this video developers can get a feel of what the new VTK Designer has to offer in terms of software infrastructur aka framework. We hope to bring more such videos to you in the near future and show case more technology frameworks that VTK Designer 2 would bring to life.

VTK Designer 2

That was the month of October 2006. That was when the last major update to VTK Designer was provided to the world. Since then I received a lot of email about VTK Designer for VTK 5.x and VTK Designer for Windows.

Since my company purchased a copy of Qt 4.2 for Windows, we also got the commercial edition of Qt 3.3.7 for Windows. So I thought of preparing a port of VTK Designer 1.0.5 for Windows. But it turned out to be a nightmare. Things just did not work out easy for me. So we dropped the whole VTK Designer 1.x series working on Windows thing and moved on to VTK Designer 2.

Before speaking more about VTK Designer 2, here is a screenshot of it running on Windows Vista showing a beautiful terrain visualization scene.

Thats right, “VTK Designer 2” works on Windows Vista now!. I have compiled it on Windows XP, Ubuntu 7.04, openSuSE 10.2 as well, and it works on all of them. 🙂

I have been trying to prepare a simple video demonstration so that I can upload it to YouTube and show some of the cool new features of “VTK Designer 2” but the damn network is slow today. Hopefully the upload should be done in a couple of minutes.

Inheritance in C++

I was casually looking at some material on C++ on the web today when I came across this. The first read messed up with my head.

After a while I thought of doing some experiments with g++, because for some strange reason the phrase “private virtual functions” popped up in my head. And I thought that was weired. My formal education in Computer Science told me that there was no way we could have private virtual functions. So I decided to write a simple test and check with g++. The test program goes something like this.

class AbstractBaseClass
virtual void PublicFunction() = 0;

virtual void ProtectedFunction() = 0;

virtual void PrivateFunction() = 0;

// Declare Friends
friend void ProbeClass(AbstractBaseClass* ptr);

class DerivedClass1 : public AbstractBaseClass
void PublicFunction() { cout << "DerivedClass1::PublicFunction()" << endl; }
void ProtectedFunction() { cout << "DerivedClass1::ProtectedFunction()" << endl; }
void PrivateFunction() { cout << "DerivedClass1::PrivateFunction()" << endl; }

class DerivedClass2 : public AbstractBaseClass
void PublicFunction() { cout << "DerivedClass2::PublicFunction()" << endl; }
void ProtectedFunction() { cout << "DerivedClass2::ProtectedFunction()" << endl; }
void PrivateFunction() { cout << "DerivedClass2::PrivateFunction()" << endl; }

void ProbeClass(AbstractBaseClass* ptr)

int main()
DerivedClass1 object1;
DerivedClass2 object2;


return 0;

To my surprise the above program compiled well on g++. And whats more, I did get the output as expected.

prashanth@vcl1:~/temp$ ./a.out

Private virtual functions do exist !!!. This is my first time with a “private” virtual function. I hope the concept wont appear weired to me anymore.