lungmask | Automated lung segmentation in CT | Computer Vision library

 by   JoHof Python Version: 0.2.20 License: Apache-2.0

kandi X-RAY | lungmask Summary

kandi X-RAY | lungmask Summary

lungmask is a Python library typically used in Artificial Intelligence, Computer Vision applications. lungmask has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can install using 'pip install lungmask' or download it from GitHub, PyPI.

Automated lung segmentation in CT
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              lungmask has a low active ecosystem.
              It has 512 star(s) with 135 fork(s). There are 17 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 2 open issues and 53 have been closed. On average issues are closed in 166 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of lungmask is 0.2.20

            kandi-Quality Quality

              lungmask has 0 bugs and 0 code smells.

            kandi-Security Security

              lungmask has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              lungmask code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              lungmask is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              lungmask releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              lungmask saves you 192 person hours of effort in developing the same functionality from scratch.
              It has 473 lines of code, 24 functions and 6 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed lungmask and discovered the below as its top functions. This is intended to give you an instant insight into lungmask implemented functionality, and help decide if they suit your requirements.
            • Performs post - processing
            • Compute the bounding box of a given labelmap
            • Removes the largest connected component
            • Preprocess image
            • Crop and resizes image
            • Generate a simple body mask
            • Apply FITS to an image
            • Apply a model to an image
            • Load a trained model
            • Get an image from a file
            • Read dicom files
            • Perform a forward transformation
            • Center the crop of a given layer
            Get all kandi verified functions for this library.

            lungmask Key Features

            No Key Features are available at this moment for lungmask.

            lungmask Examples and Code Snippets

            No Code Snippets are available at this moment for lungmask.

            Community Discussions

            QUESTION

            How can I keep the association between image and coordinate (z-axis) after a preprocess function?
            Asked 2020-Sep-10 at 07:24

            I'm working on a preprocessing function that takes DICOM files a input and returns a 3D np.array (image stack). The problem is that I need to keep the association between ImagePositionPatient[2] and the relative position of the processed images in the output array.

            For example, if a slice with ImagePositionPatient[2] == 5 is mapped to a processed slice in position 3 in the returned stack, I need to return another array that has 5 in the third position, and the same for all original slices. For slices created during processing by interpolation or padding, the array shall contain a palceholder value like -99999 instead.

            I paste my code here. EDIT: new simplified version

            ...

            ANSWER

            Answered 2020-Jun-08 at 06:22

            I will try to give at least some hints to the answer. As has been discussed in the comments, resizing may remove the processed data at the original positions due to needed interpolation - so in the end you have to come up with a solution for that, either by changing the resizing target to a multipe of the actual resolution, or by returning the interpolated positions instead.

            The basic idea is to have your positions array z be transformed the same as the images are in z direction. So for each operation in processing that changes the z location of the processed image, a similar operation has to be done for z.

            Let's say you have 5 slices with a slice distance of 3mm:

            Source https://stackoverflow.com/questions/62233177

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install lungmask

            On Windows, depending on your setup, it may be necessary to install torch beforehand: https://pytorch.org.

            Support

            Runtime between CPU-only and GPU supported inference varies greatly. Using the GPU, processing a volume takes only several seconds, using the CPU-only will take several minutes. To make use of the GPU make sure that your torch installation has CUDA support. In case of cuda out of memory errors reduce the batchsize to 1 with the optional argument --batchsize 1.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install lungmask

          • CLONE
          • HTTPS

            https://github.com/JoHof/lungmask.git

          • CLI

            gh repo clone JoHof/lungmask

          • sshUrl

            git@github.com:JoHof/lungmask.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link