Comments (6)
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 PTKGetLungROIForCT.m
).
from pulmonarytoolkit.
Thanks Tom, That issue is fixed!.
When i segment the image and manually corrected them, i export them to jpeg files.
As soon as I do that, the masks get cropped off at left and right boundary as seen in this snapshot. The exported masks also have this trimming. Not sure why this might happen.
from pulmonarytoolkit.
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)
from pulmonarytoolkit.
Hello,
I have encountered the same issue with the cropping image. I'd like to switch PTK into "full image" display mode, but in gui there is no button for that. I suppose that I need to switch PTK to developer mode, to see a Plugins screen. How can I do it, please?
Thank you in advance.
from pulmonarytoolkit.
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.
from pulmonarytoolkit.
This is a quick fix:
-
Run segment lung (segment tab lungs button)
-
Correct the boundary and save edits
-
Segment the lung again.
-
Find PTKGetLungROIForCT.m comment line 47 which is
reduced_image = PTKSegmentLungsWithoutClosing(reduced_image, false, true, false, reporting); Segment the lung again, manually correct the segment, save edits. and segment the lung
The 4th step skipped the cropping process and can save this mask from here.
This is just a temporary fix I think - need to uncomment it back if you want to do other operations.
from pulmonarytoolkit.
Related Issues (20)
- plumonary toolkit failure HOT 3
- Change coordinates HOT 1
- Deleting multiple patients HOT 3
- Saving Output as different name? HOT 1
- Hessian based fissure filter
- Can't Load Nii files in pulmonary toolkit HOT 4
- Cannot seperate lung lobes while there is a thin or irregular fissure ? HOT 1
- Running in non-interactive mode HOT 1
- How to export Parameter LungAnalysis in Matlab's Workspace? HOT 2
- Freehand editing of airways HOT 1
- Broken links for documentation HOT 1
- User stories related to PTK
- Error using "lung" tool HOT 1
- asking passward HOT 1
- How to save segmentation results in NIFTI format HOT 2
- asking lung images HOT 2
- erroring when clicked the coronal analysis,sagittial analysis ,axial analysis button HOT 2
- can not import .nii file HOT 1
- Java Heap space HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pulmonarytoolkit.