motionSegmentation


NamemotionSegmentation JSON
Version 2.9.2 PyPI version JSON
download
home_pageNone
SummaryExplicit spatio-temporal regularization of motion tracking.
upload_time2024-05-21 05:43:48
maintainerNone
docs_urlNone
authorNone
requires_python>=3.6
licenseMIT License Copyright (c) 2019 W. X. Chan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords explicit motion regularization
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # motionSegmentation
Explicit spatio-temporal regularization of motion tracking<sup>1</sup> using registered vector maps from SimpleElastix<sup>2</sup>

### Installation
If your default python is python3:
pip install motionSegmentation

### Usage
#### simpleSolver(savePath,startstep=1,endstep=7,fileScale=None,getCompoundTimeList=None,compoundSchemeList=None,fftLagrangian=True,pngFileFormat=None,period=None,maskImg=True,anchor=None,peroid=None,bgrid=4.,finalShape=None,fourierTerms=4,twoD=False)
###### REQUIRED FILES
savePath+'/scale.txt': the length per pixel x, y, z of the image 
###### OPTIONAL FILES
savePath+'/diastole_systole.txt': diastole and systolic time frame
savePath+'/transform/manual_t{0:d}to{1:d}_0.txt'.format(anchor[n][0],anchor[n][1]): additional bspline vectors to support the motion estimation
###### savePath
set the folder path to be used where the generated and required files will be are.
###### startstep, endstep
Set the start and end step for the simpleSolver.

step 1: load image -- Image will be loaded as savePath+'/'+pngFileFormat.format(t,z)

step 2: create mask

step 3: Registrations

step 4: initialize BSF using fft

step 5: solve BSF

step 6: regrid to time

setp 7: compute compound

###### fileScale
set based on the scale of image dimension such that fileScale*AVERAGE_IMAGE_DIMENSION > 1

###### getCompoundTimeList,
set the timestep(s) for compounding in a list, if None, it will use diastolic and systolic timesteps in savePath+'/diastole_systole.txt', if file does not exist, it will be set as [0]

###### compoundSchemeList
set the compounding method(s) to use in a list, if None it will be set for all the supported compounding methods ['SAC','maximum','mean','wavelet'] 

###### fftLagrangian
Set to False if you do not want to use time frame 0 as reference (t -> t+1 and 0 -> t will be registered), then t -> t+1 and t -> t-1 will be registered.

###### pngFileFormat
set the string format to read and stacked multiple images, if None, defaults to 'time{0:03d}/slice{{0:03d}}time{0:03d}.png' for 3D and 'time{0:03d}.png' for 2D.

###### period
Set the period of the motion in time frame (can be a float), if None, it will default as the len(DIMENSION t)

###### maskImg
if True, it will auto detect and mask borders with 0 intensity

###### anchor
set as a List of pairs of time frame to include in the motion estimation in addition to the default: [[anchor_t_n1,anchor_t_m1],[anchor_t_n2,anchor_t_m2],...]

It will find the bspline files in savePath+'/transform/manual_t{0:d}to{1:d}_0.txt'.format(anchor[n][0],anchor[n][1]) for each pair

###### bgrid
set the spacing of the uniform bspline grid use to represent the image registration in terms of pixels of the largest dimension

###### fourierTerms
Number of Fourier terms, number of Fourier coefficients = Fourier terms*2+1

###### finalShape
Set the final uniform bspline grid shape (NUMBER OF CONTROL POINTS IN x,NUMBER OF CONTROL POINTS IN y,NUMBER OF CONTROL POINTS IN z,NUMBER FOURIER COEFFICIENTS PER CONTROL POINT, NUMBER OF DIMENSIONS), if None, it will default to the shape in t0 -> t1 registration.

###### twoD
set to True is the image set is in 2D

### References
<sup>1</sup> Wiputra, H., Chan, W. X., Foo, Y. Y., Ho, S., & Yap, C. H. (2020). Cardiac motion estimation from medical images: a regularisation framework applied on pairwise image registration displacement fields. Scientific reports, 10(1), 1-14.

<sup>2</sup> Bradley Lowekamp, ., gabehart, ., Daniel Blezek, ., Luis Ibanez, ., Matt McCormick, ., Dave Chen, ., … Brad King, . (2015, June 26). SimpleElastix: SimpleElastix v0.9.0 (Version v0.9.0-SimpleElastix). Zenodo. http://doi.org/10.5281/zenodo.19049

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "motionSegmentation",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "explicit, motion, regularization",
    "author": null,
    "author_email": "Wei Xuan Chan <w.x.chan1986@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/c2/de/6fd1c9c6ae8c10a9e9badda0168ccf22db42cf50de4d0be84c6e1847be02/motionsegmentation-2.9.2.tar.gz",
    "platform": null,
    "description": "# motionSegmentation\r\nExplicit spatio-temporal regularization of motion tracking<sup>1</sup> using registered vector maps from SimpleElastix<sup>2</sup>\r\n\r\n### Installation\r\nIf your default python is python3:\r\npip install motionSegmentation\r\n\r\n### Usage\r\n#### simpleSolver(savePath,startstep=1,endstep=7,fileScale=None,getCompoundTimeList=None,compoundSchemeList=None,fftLagrangian=True,pngFileFormat=None,period=None,maskImg=True,anchor=None,peroid=None,bgrid=4.,finalShape=None,fourierTerms=4,twoD=False)\r\n###### REQUIRED FILES\r\nsavePath+'/scale.txt': the length per pixel x, y, z of the image \r\n###### OPTIONAL FILES\r\nsavePath+'/diastole_systole.txt': diastole and systolic time frame\r\nsavePath+'/transform/manual_t{0:d}to{1:d}_0.txt'.format(anchor[n][0],anchor[n][1]): additional bspline vectors to support the motion estimation\r\n###### savePath\r\nset the folder path to be used where the generated and required files will be are.\r\n###### startstep, endstep\r\nSet the start and end step for the simpleSolver.\r\n\r\nstep 1: load image -- Image will be loaded as savePath+'/'+pngFileFormat.format(t,z)\r\n\r\nstep 2: create mask\r\n\r\nstep 3: Registrations\r\n\r\nstep 4: initialize BSF using fft\r\n\r\nstep 5: solve BSF\r\n\r\nstep 6: regrid to time\r\n\r\nsetp 7: compute compound\r\n\r\n###### fileScale\r\nset based on the scale of image dimension such that fileScale*AVERAGE_IMAGE_DIMENSION > 1\r\n\r\n###### getCompoundTimeList,\r\nset the timestep(s) for compounding in a list, if None, it will use diastolic and systolic timesteps in savePath+'/diastole_systole.txt', if file does not exist, it will be set as [0]\r\n\r\n###### compoundSchemeList\r\nset the compounding method(s) to use in a list, if None it will be set for all the supported compounding methods ['SAC','maximum','mean','wavelet'] \r\n\r\n###### fftLagrangian\r\nSet to False if you do not want to use time frame 0 as reference (t -> t+1 and 0 -> t will be registered), then t -> t+1 and t -> t-1 will be registered.\r\n\r\n###### pngFileFormat\r\nset the string format to read and stacked multiple images, if None, defaults to 'time{0:03d}/slice{{0:03d}}time{0:03d}.png' for 3D and 'time{0:03d}.png' for 2D.\r\n\r\n###### period\r\nSet the period of the motion in time frame (can be a float), if None, it will default as the len(DIMENSION t)\r\n\r\n###### maskImg\r\nif True, it will auto detect and mask borders with 0 intensity\r\n\r\n###### anchor\r\nset as a List of pairs of time frame to include in the motion estimation in addition to the default: [[anchor_t_n1,anchor_t_m1],[anchor_t_n2,anchor_t_m2],...]\r\n\r\nIt will find the bspline files in savePath+'/transform/manual_t{0:d}to{1:d}_0.txt'.format(anchor[n][0],anchor[n][1]) for each pair\r\n\r\n###### bgrid\r\nset the spacing of the uniform bspline grid use to represent the image registration in terms of pixels of the largest dimension\r\n\r\n###### fourierTerms\r\nNumber of Fourier terms, number of Fourier coefficients = Fourier terms*2+1\r\n\r\n###### finalShape\r\nSet the final uniform bspline grid shape (NUMBER OF CONTROL POINTS IN x,NUMBER OF CONTROL POINTS IN y,NUMBER OF CONTROL POINTS IN z,NUMBER FOURIER COEFFICIENTS PER CONTROL POINT, NUMBER OF DIMENSIONS), if None, it will default to the shape in t0 -> t1 registration.\r\n\r\n###### twoD\r\nset to True is the image set is in 2D\r\n\r\n### References\r\n<sup>1</sup> Wiputra, H., Chan, W. X., Foo, Y. Y., Ho, S., & Yap, C. H. (2020). Cardiac motion estimation from medical images: a regularisation framework applied on pairwise image registration displacement fields. Scientific reports, 10(1), 1-14.\r\n\r\n<sup>2</sup> Bradley Lowekamp, ., gabehart, ., Daniel Blezek, ., Luis Ibanez, ., Matt McCormick, ., Dave Chen, ., \u2026 Brad King, . (2015, June 26). SimpleElastix: SimpleElastix v0.9.0 (Version v0.9.0-SimpleElastix). Zenodo. http://doi.org/10.5281/zenodo.19049\r\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2019 W. X. Chan  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Explicit spatio-temporal regularization of motion tracking.",
    "version": "2.9.2",
    "project_urls": {
        "Homepage": "https://github.com/WeiXuanChan/motionSegmentation"
    },
    "split_keywords": [
        "explicit",
        " motion",
        " regularization"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8505ad86666569906b13c72583ef1d47e82a03e38db2aedc58d99dd3654a6e11",
                "md5": "ca8e6995db092e2ac47bbf6784d9784d",
                "sha256": "3a32de23083d64af74e4bb3df5232afb67bf1ffeb62ac00c14c90976f444917c"
            },
            "downloads": -1,
            "filename": "motionSegmentation-2.9.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ca8e6995db092e2ac47bbf6784d9784d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 55194,
            "upload_time": "2024-05-21T05:43:46",
            "upload_time_iso_8601": "2024-05-21T05:43:46.775749Z",
            "url": "https://files.pythonhosted.org/packages/85/05/ad86666569906b13c72583ef1d47e82a03e38db2aedc58d99dd3654a6e11/motionSegmentation-2.9.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c2de6fd1c9c6ae8c10a9e9badda0168ccf22db42cf50de4d0be84c6e1847be02",
                "md5": "b3bae796a66bf847f098153d0bfda243",
                "sha256": "98cd9a164540092d9a138f497bd4513c979d5d83f763c07764249fe959b7e01e"
            },
            "downloads": -1,
            "filename": "motionsegmentation-2.9.2.tar.gz",
            "has_sig": false,
            "md5_digest": "b3bae796a66bf847f098153d0bfda243",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 55185,
            "upload_time": "2024-05-21T05:43:48",
            "upload_time_iso_8601": "2024-05-21T05:43:48.953747Z",
            "url": "https://files.pythonhosted.org/packages/c2/de/6fd1c9c6ae8c10a9e9badda0168ccf22db42cf50de4d0be84c6e1847be02/motionsegmentation-2.9.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-21 05:43:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "WeiXuanChan",
    "github_project": "motionSegmentation",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "motionsegmentation"
}
        
Elapsed time: 0.24041s