In order to define a contextual action for seismic data nodes, you need to put your Python script in your Python directory under a directory called Contextual_Seismic_Data_Node.
Go to Tools->Options->Environment->Python Scripts (or Tools->Options->Python->Scripts in INTViewer 5.2) and click "Refresh from Disk". Your script should be listed automatically.
You will now be able to execute this script from the contextual menu of the seismic data node:
This script will open the seismic data set in a new seismic window, map window and 3D window depending on if the data is a volume, gather or seismic line.
This script is attached to the bottom of this article.
The result after the script executes should look something like the following, if executed on a volume, line, and gather respectively.