-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PTK viewer zoom #38
Comments
Hi Hari, PTK automatically crops the image to what it thinks is the lung region of interest (ROI). However, it determines this by segmenting the lung using an air threshold and region growing. If there's a lot of disease it may not detect the whole lung and will crop out too much. You can switch PTK into "full image" display by selecting "Full Image" as the Context on the Plugins screen (in the codebase this is called the 'Original Image' Context). Note this doesn't change the way any of the algorithms operate, it just shows the results on top of the full image rather than the cropped ROI. If the segmentation algorithms are failing, this won't fix them; it would need changes to the ROI detection algorithm (see |
I think it's the same reason as before - the Lung Region of Interest (Lung ROI) is wrong. I don't think there's a simple solution in the UI - it would require some programming. Lung segmentations (and any manual corrections to them) are cropped to the Lung ROI "Context" so if the Lung ROI misses out parts of the lung then the segmentations will be cropped too. The Lung ROI is determined by the algorithm in PTKGetLungROIForCT.m (which calls PTKSegmentLungsWithoutClosing.m). It should include the whole lung region, but in this case it's not detecting all of the lung because of disease. You can in theory manually correct the LungROI (because you can manually correct any plugin result in PTK) but there is no tool for this in the UI so it would have to be done with the Matlab programming API. So to fix it would require either: a) modifying the above algorithm files to improve the ROI detection (note to stop PTK using previous cached results you need to increase the Version property in the PTKLungROI.m every time you modify the algorithms); or b) applying a manual correction to the LungROI plugin results (this can't be done via the UI but could be done in Matlab but requires you to understand how to save manual corrections via the PTK API) |
Hello, |
Hi @jakublaznovsky. Developer mode is enabled by clicking the "Show dev tools" button on the toolbar at the bottom. However, this won't fix your issue if you're planning to use any of the lung segmentation or analysis tools. PTK crops the image to the lung context, determined by the LungROI algorithm. So if the image is being cropped inside the lung boundary, it means the LungROI plugin does not work with your data. You'd need to modify or replace the LungROI algrorithm with your own that is designed for your data. Switching to "full image" mode does not change the region used by the lung segmentation and analysis algorithms. All it does is display the results on the full image. The algorithms still operate on the LungROI context, so if that is wrong the algorithms may not produce the correct results. |
This is a quick fix:
The 4th step skipped the cropping process and can save this mask from here. |
I used PTK to load up a scan recently. Its compressed Dicom images of ARDS patient.
It loads fine on ITK-snap and 3D slicer.
But PTK zooms it when imported and seems to crop out the image. Is there any setting i should change. Thanks.
The text was updated successfully, but these errors were encountered: