#!/usr/bin/env python

def AddVTKObjectWithAttributes(the_vtkobject,\
                            the_parentframe,\
                            the_type,\
                            the_label,\
                            is_a_child_of_label,\
                            tree_item,\
                            tree_item_image_id,\
                            tree_item_alt_image_id,\
                            is_currently_visible,\
                            structural_or_functional,\
                            data_volume,\
                            data_path,\
                            has_property_frame,\
                            property_frame_type,\
                            property_frame_instance):
#add all objects to be rendered to a list so that functions can access them and their associated
# child-objects later
    the_vtkobject.my_parent_frame = the_parentframe
    the_vtkobject.my_type = the_type
    the_vtkobject.my_label = the_label
    the_vtkobject.my_parents_label = is_a_child_of_label
    the_vtkobject.my_treeitem = tree_item
    the_vtkobject.my_treeitem_img1 = tree_item_image_id
    the_vtkobject.my_treeitem_img2 = tree_item_alt_image_id
    the_vtkobject.my_visibility = is_currently_visible
    the_vtkobject.my_struct_or_func = structural_or_functional
    the_vtkobject.my_data_volume = data_volume
    the_vtkobject.my_data_path = data_path
    the_vtkobject.my_has_property_frame = has_property_frame
    the_vtkobject.my_property_frame_type = property_frame_type
    the_vtkobject.my_property_frame_instance = property_frame_instance
    
    #append the newly created object to the bject list in the main window
    the_parentframe.ListOfObjects.append(the_vtkobject)

    ####now also append the object to the processing list so that we can create a
    #### session file if required.
    ####write actions so far to processing array
    #### 1 - internal or external data
    #### 2 - path / reference to data
    #### 3 - manipulation applied
    #### 4 - set of values passed (comma separated string)
    ###the_parentframe.Completed_processes[0] = ['ext',file_to_load,'base volume',str(self.base_loaded)]
            