In this project, we want to investigate and compare several approaches to convert DICOM Structured reports into DICOM segmentation objects. We use the integrated SLIM Viewer in Kaapana to create Structured Reports on DICOM WSI files and also want to compare the QuPath viewer as additional DICOM WSI viewer in Kaapana.
for i in range(AnnotatetObjects3):
Type=FileFull.ContentSequence[13].ContentSequence[i].ContentSequence[2].ConceptCodeSequence[0].CodeMeaning
Coords3=FileFull.ContentSequence[13].ContentSequence[i].ContentSequence[3].GraphicData
x_coords3 = [int((Coords3[i]-Origin_X)/spacing_x) for i in range(0, len(Coords3), 3)]
y_coords3 = [int((Coords3[i]-Origin_Y)/spacing_y) for i in range(1, len(Coords3), 3)]
if Type=='Tissue':
tissue_list.append([x_coords3,y_coords3])
color=(255,0,0)
else:
tumor_list.append([x_coords3,y_coords3])
color=(0,0,255)
contours = np.array([[[abs(x), abs(y)] for x, y in zip(x_coords3, y_coords3)]], dtype=np.int32)
.
sr = hd.sr.srread("/Users/maximilianfischer/ProjectsMountDir/CMU-1/Consistent/SR/DICOM/1E447C90/E88940CE/4E17833F.dcm")
groups = sr.content.get_planar_roi_measurement_groups()
groups[0].roi
groups[0].roi.value
coords=[]
for x in range(groups[0].roi.value.shape[0]):
coords.append([groups[0].roi.value[x][0],groups[0].roi.value[x][1]])
Much shorter code!
No response
This project is the continuation from last years project weeks. PW 38 PW 39 Kaapana