5 #ifndef NetCDFTimeAnnotationPlugin_server_manager_data_h 6 #define NetCDFTimeAnnotationPlugin_server_manager_data_h 15 "<ServerManagerConfiguration>\n" 16 " <ProxyGroup name=\"filters\">\n" 17 " <CompoundSourceProxy name=\"NetCDFTimeAnnotation\" label=\"NetCDF Time Annotation\">\n" 18 " <Proxy group=\"filters\" type=\"ProgrammableFilter\" id=\"6868\" servers=\"1\" compound_name=\"ProgrammableFilter1\">\n" 19 " <Property name=\"CopyArrays\" id=\"6868.CopyArrays\" number_of_elements=\"1\">\n" 20 " <Element index=\"0\" value=\"0\"/>\n" 21 " <Domain name=\"bool\" id=\"6868.CopyArrays.bool\"/>\n" 23 " <Property name=\"InformationScript\" id=\"6868.InformationScript\" number_of_elements=\"1\">\n" 24 " <Element index=\"0\" value=\"\"/>\n" 26 " <Property name=\"Input\" id=\"6868.Input\" number_of_elements=\"1\">\n" 27 " <Domain name=\"groups\" id=\"6868.Input.groups\"/>\n" 28 " <Domain name=\"input_type\" id=\"6868.Input.input_type\"/>\n" 30 " <Property name=\"OutputDataSetType\" id=\"6868.OutputDataSetType\" number_of_elements=\"1\">\n" 31 " <Element index=\"0\" value=\"8\"/>\n" 32 " <Domain name=\"enum\" id=\"6868.OutputDataSetType.enum\">\n" 33 " <Entry value=\"8\" text=\"Same as Input\"/>\n" 34 " <Entry value=\"0\" text=\"vtkPolyData\"/>\n" 35 " <Entry value=\"2\" text=\"vtkStructuredGrid\"/>\n" 36 " <Entry value=\"3\" text=\"vtkRectilinearGrid\"/>\n" 37 " <Entry value=\"4\" text=\"vtkUnstructuredGrid\"/>\n" 38 " <Entry value=\"6\" text=\"vtkImageData\"/>\n" 39 " <Entry value=\"10\" text=\"vtkUniformGrid\"/>\n" 40 " <Entry value=\"13\" text=\"vtkMultiblockDataSet\"/>\n" 41 " <Entry value=\"15\" text=\"vtkHierarchicalBoxDataSet\"/>\n" 42 " <Entry value=\"19\" text=\"vtkTable\"/>\n" 43 " <Entry value=\"33\" text=\"vtkMolecule\"/>\n" 46 " <Property name=\"PythonPath\" id=\"6868.PythonPath\" number_of_elements=\"1\">\n" 47 " <Element index=\"0\" value=\"\"/>\n" 49 " <Property name=\"Script\" id=\"6868.Script\" number_of_elements=\"1\">\n" 50 " <Element index=\"0\" value=\"from netcdftime import utime
from netcdftime import datetime

inp = self.GetInputDataObject(0,0)
outp = self.GetOutputDataObject(0)

currentTime = inp.GetInformation().Get(vtk.vtkDataObject.DATA_TIME_STEP())
timeUnitsArray = inp.GetFieldData().GetAbstractArray("time_units")
if timeUnitsArray:
 timeUnits = timeUnitsArray.GetValue(0)

 cdftime = utime(timeUnits)
 t = cdftime.num2date(currentTime)

 fdate = vtk.vtkStringArray()
 fdate.SetName("FullDate")
 fdate.SetNumberOfValues(1)
 fdate.SetValue(0, str(t))
 outp.GetFieldData().AddArray(fdate)

 date = vtk.vtkIntArray()
 date.SetName("Date")
 date.SetNumberOfValues(6)
 date.SetValue(0, t.year)
 date.SetValue(1, t.month)
 date.SetValue(2, t.day)
 date.SetValue(3, t.hour)
 date.SetValue(4, t.minute)
 date.SetValue(5, t.second)
 outp.GetFieldData().AddArray(date)
\"/>\n" 52 " <Property name=\"UpdateExtentScript\" id=\"6868.UpdateExtentScript\" number_of_elements=\"1\">\n" 53 " <Element index=\"0\" value=\"\"/>\n" 56 " <Proxy group=\"filters\" type=\"PythonAnnotation\" id=\"7137\" servers=\"1\" compound_name=\"PythonAnnotation1\">\n" 57 " <Property name=\"AnnotationValue\" id=\"7137.AnnotationValue\" number_of_elements=\"1\">\n" 58 " <Element index=\"0\" value=\"On 2001.01.00 at 00:00\"/>\n" 60 " <Property name=\"ArrayAssociation\" id=\"7137.ArrayAssociation\" number_of_elements=\"1\">\n" 61 " <Element index=\"0\" value=\"2\"/>\n" 62 " <Domain name=\"enum\" id=\"7137.ArrayAssociation.enum\">\n" 63 " <Entry value=\"0\" text=\"Point Data\"/>\n" 64 " <Entry value=\"1\" text=\"Cell Data\"/>\n" 65 " <Entry value=\"2\" text=\"Field Data\"/>\n" 66 " <Entry value=\"6\" text=\"Row Data\"/>\n" 69 " <Property name=\"Expression\" id=\"7137.Expression\" number_of_elements=\"1\">\n" 70 " <Element index=\"0\" value=\""On %02i.%02i.%02i at %02i:%02i" % (Date[0], Date[1], Date[2], Date[3], Date[4])\"/>\n" 72 " <Property name=\"Input\" id=\"7137.Input\" number_of_elements=\"1\">\n" 73 " <Proxy value=\"6868\" output_port=\"0\"/>\n" 74 " <Domain name=\"groups\" id=\"7137.Input.groups\"/>\n" 75 " <Domain name=\"input_type\" id=\"7137.Input.input_type\"/>\n" 78 " <ExposedProperties>\n" 79 " <Property name=\"Input\" proxy_name=\"ProgrammableFilter1\" exposed_name=\"Input\"/>\n" 80 " <!--Property name=\"Script\" proxy_name=\"ProgrammableFilter1\" exposed_name=\"Script\"/-->\n" 81 " <Property name=\"Expression\" proxy_name=\"PythonAnnotation1\" exposed_name=\"Expression\"/>\n" 82 " </ExposedProperties>\n" 83 " <OutputPort name=\"Output\" proxy=\"PythonAnnotation1\" port_index=\"0\"/>\n" 85 " <ShowInMenu category=\"Annotation\" />\n" 86 " <Visibility replace_input=\"0\" />\n" 87 " <OutputPort index=\"0\"\n" 88 " name=\"Output-0\"\n" 91 " </CompoundSourceProxy>\n" 93 "</ServerManagerConfiguration>\n" 102 char* res =
new char[ len + 1];
105 assert(offset == len);
static const char *const NetCDFTimeAnnotationPlugin_server_managerNetCDFTimeAnnotationInterface0
char * NetCDFTimeAnnotationPlugin_server_managerNetCDFTimeAnnotationGetInterfaces()