Skip to content

Commit

Permalink
code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandip117 committed Dec 17, 2024
1 parent 7e764ac commit 783fa98
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions chrisClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,34 +68,6 @@ def pl_run_dicomdir(self, dicom_dir: str, tag_struct: str, pv_id: int) -> int:
pv_in_id = self.__create_feed(pl_id, {"previous_id": pv_id, 'dir': dicom_dir})
return int(pv_in_id)

def anonymize_(self, dicom_dir: str, tag_struct: str, send_params: dict, pv_id: int):

pl_id = self.__get_plugin_id({"name": "pl-dsdircopy", "version": "1.0.2"})
pl_sub_id = self.__get_plugin_id({"name": "pl-pfdicom_tagsub", "version": "3.3.4"})
pl_dcm_id = self.__get_plugin_id({"name": "pl-orthanc_push", "version": "1.2.7"})

# 1) Run dircopy
# empty directory check
if len(dicom_dir) == 0:
LOG(f"No directory found in CUBE containing files for search : {tag_struct}")
return
pv_in_id = self.__create_feed(pl_id, {"previous_id": pv_id, 'dir': dicom_dir})

# 2) Run anonymization
data = {"previous_id": pv_in_id, "tagStruct": tag_struct, 'fileFilter': '.dcm'}
tag_sub_id = self.__create_feed(pl_sub_id, data)

# 3) Push results
dir_send_data = {
"previous_id": tag_sub_id,
'inputFileFilter': "**/*dcm",
"orthancUrl": send_params["url"],
"username": send_params["username"],
"password": send_params["password"],
"pushToRemote": send_params["aec"]
}
pl_inst_id = self.__create_feed(pl_dcm_id, dir_send_data)

def __create_feed(self, plugin_id: str,params: dict):
response = self.cl.create_plugin_instance(plugin_id, params)
return response['id']
Expand Down

0 comments on commit 783fa98

Please sign in to comment.