def deleteFilterTypeButtonPressed(self,selectedFilterFileName,filterType):

        jsonHelper.removeFilterTypeFromJSONForFilterType(selectedFilterFileName,filterType)

        if filterType ==  'Head':
            os.remove('./filterTypesConfig/headFilters/'+selectedFilterFileName)    
        else:
            os.remove('./filterTypesConfig/jawFilters/'+selectedFilterFileName)  

        self.parent.destroy()     
    def applyFilterTypeButtonPressed(self, selectedFilterFileName, groupDescriptionFrameList, filterType):

        enabledGroupNames = []

        for groupDescriptionFrame in groupDescriptionFrameList:
            if groupDescriptionFrame.isEnabled():
                enabledGroupNames.append(groupDescriptionFrame.groupName)

        jsonHelper.removeFilterTypeFromJSONForFilterType(selectedFilterFileName, filterType)
        jsonHelper.addFilterTypeToJSON(selectedFilterFileName, enabledGroupNames, filterType)

        self.parent.destroy()