{"name":"affinder","display_name":"affinder","visibility":"public","icon":"","categories":["Transformations"],"schema_version":"0.2.1","on_activate":null,"on_deactivate":null,"contributions":{"commands":[{"id":"affinder.start_affinder","title":"Start affinder...","python_name":"affinder:start_affinder","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"affinder.copy_affine","title":"Copy affine...","python_name":"affinder:copy_affine","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"affinder.apply_affine","title":"Apply affine...","python_name":"affinder:apply_affine","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"affinder.load_affine","title":"Load affine...","python_name":"affinder:load_affine","short_title":null,"category":null,"icon":null,"enablement":null}],"readers":null,"writers":null,"widgets":[{"command":"affinder.start_affinder","display_name":"Start affinder","autogenerate":false},{"command":"affinder.copy_affine","display_name":"Copy affine","autogenerate":false},{"command":"affinder.apply_affine","display_name":"Apply affine","autogenerate":false},{"command":"affinder.load_affine","display_name":"Load affine","autogenerate":false}],"sample_data":null,"themes":null,"menus":{"napari/layers/register":[{"command":"affinder.start_affinder","when":null,"group":null,"alt":null}],"napari/layers/transform":[{"command":"affinder.copy_affine","when":null,"group":null,"alt":null},{"command":"affinder.apply_affine","when":null,"group":null,"alt":null},{"command":"affinder.load_affine","when":null,"group":null,"alt":null}]},"submenus":null,"keybindings":null,"configuration":[]},"package_metadata":{"metadata_version":"2.4","name":"affinder","version":"0.5.0","dynamic":["license-file"],"platform":null,"supported_platform":null,"summary":"Quickly find the affine matrix mapping one image to another using manual correspondence points annotation","description":"# Description\n\nThis GUI plugin allows you to quickly find the affine matrix mapping\none image to another using manual correspondence points annotation.\n\nMore simply, this plugin allows you to select corresponding points\non an image, and a second image you wish to transform. It computes \nthe requisite transformation matrix using Affine Transform, Euclidean Transform, \nor Similarity Transform, and performs this transformation on the\nmoving image, aligning it to the reference image.\n\nhttps://user-images.githubusercontent.com/17995243/120086403-f1d0b300-c121-11eb-8000-a44a2ac54339.mp4\n\n\n# Who is This For?\n\nThis is a simple plugin which can be used on any 2D images, provided\nthey can be loaded as layers into napari. The images need not be the same\nfile format and this plugin also works with labels layers.\n\nNo prior understanding of the transformation methods is required, as\nthey perform in the background based on the reference points selected.\n\n# How to Guide\n\nYou will need a combination of two or more 2D image and/or labels layers \nloaded into napari. Once you have installed affinder, you can find it in\nthe dock widgets menu.\n\n![Affinder widget in the Plugins->Add Dock Widget menu](https://i.imgur.com/w7MCXQy.png)\n\nThe first two dropdown boxes will be populated with the layers currently\nloaded into napari. Select a layer to use as reference, and another to\ntransform.\n\n![Dropdowns allow you to select the reference and moving layers](https://i.imgur.com/Tdbm1sX.png)\n\nNext, you can select the transformation model to use (affine is selected by default\nand is the least rigid transformation of those available). See [below](#transformation-models) for a\ndescription of the different models.\n\nFinally, you can optionally select a path to a text file for saving out the\nresulting transformation matrix.\n\nWhen you click Start, affinder will add two points layers to napari. \nThe plugin will also bring your reference image in focus, and its associated points\nlayer. You can then start adding reference points by clicking on your image.\n\n![Adding reference points to layer](https://i.imgur.com/WPzNtyy.png)\n\nOnce three points are added, affinder will switch focus to the moving image,\nand you should then proceed to select the corresponding three points.\n\n![Adding corresponding points to newly focused layer](https://i.imgur.com/JVZCvmp.png)\n\naffinder will immediately transform the moving image to align the points you've\nselected when you add your third corresponding point to your moving image.\n\n![The moving image is transformed once three points are added](https://i.imgur.com/NTne9fj.png)\n\nFrom there, you can continue iteratively adding points until you \nare happy with the alignment. Affinder will switch focus between\nreference and moving image with each point.\n\nClick Finish to exit affinder.\n\n## Transformation Models\n\nThere are three transformation models available for use with affinder.\nThey are listed here in order of increasing rigidity in the types of\ntransforms they will allow. The eponymous Affine Transform is the \nleast rigid and is the default choice.\n\n- [**Affine Transform**](https://en.wikipedia.org/wiki/Affine_transformation): \nthe least rigid transformation, it preserves\nlines and parallelism, but not necessarily distance and angles. Translation,\nscaling, similarity, reflection, rotation and shearing are all valid\naffine transformations.\n\n- [**Similarity Transform**](https://en.wikipedia.org/wiki/Similarity_(geometry)): \nthis is a \"shape preserving\" transformation, producing objects which are \ngeometrically similar. Translation, rotation, reflection and uniform scaling are \nvalid similarity transforms. Shearing is not.\n\n- [**Euclidean Transform**](https://en.wikipedia.org/wiki/Rigid_transformation):\nAlso known as a rigid transformation, this transform preserves the Euclidean\ndistance between each pair of points on the image. This includes rotation,\ntranslation and reflection but not scaling or shearing.\n\n# Getting Help\n\nIf you find a bug with affinder, or would like support with using it, please raise an\nissue on the [GitHub repository](https://github.com/jni/affinder).\n\n# How to Cite\n\nMany plugins may be used in the course of published (or publishable) research, as well as\nduring conference talks and other public facing events. If you'd like to be cited in\na particular format, or have a DOI you'd like used, you should provide that information here.\n","description_content_type":"text/markdown","keywords":null,"home_page":"https://github.com/jni/affinder","download_url":null,"author":"Juan Nunez-Iglesias","author_email":"juan.nunez-iglesias@monash.edu","maintainer":null,"maintainer_email":null,"license":"BSD-3","classifier":["Development Status :: 3 - Alpha","Intended Audience :: Developers","Framework :: napari","Topic :: Software Development :: Testing","Programming Language :: Python","Programming Language :: Python :: 3","Programming Language :: Python :: 3.9","Programming Language :: Python :: 3.10","Programming Language :: Python :: 3.11","Operating System :: OS Independent","License :: OSI Approved :: BSD License"],"requires_dist":["napari>=0.4.17","npe2>=0.1.2","numpy","scikit-image>=0.19.2","magicgui>=0.3.7","toolz","coverage; extra == \"testing\"","pydantic<2; extra == \"testing\"","pytest; extra == \"testing\"","pytest-cov; extra == \"testing\"","pytest-qt; extra == \"testing\"","scikit-image[data]; extra == \"testing\"","napari[pyqt5]!=0.4.18; extra == \"testing\"","pygments!=2.16; extra == \"testing\"","zarr; extra == \"testing\"","furo; extra == \"docs\"","myst-parser; extra == \"docs\""],"requires_python":">=3.9","requires_external":null,"project_url":null,"provides_extra":["testing","docs"],"provides_dist":null,"obsoletes_dist":null},"npe1_shim":false}