GithubHelp home page GithubHelp logo

dennisjosesilva / pomar Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 498 KB

Morphological Tree Framework in C++

C++ 97.30% CMake 2.42% Python 0.28%
component-tree tree component-tree-reconstruction

pomar's People

Contributors

alexmorimitsu avatar dennisjosesilva avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

pomar's Issues

Documentation

A basic documentation for users get started with.

Attribute collection

Design and implement a class to represent a collection attributes over the nodes of a component tree. For example, this class should provide a way to access the values of a set of attributes (defined by the user) for each node. For example:

attr[attr_type][node_id] => return the value of attribute 'attr_type' of the node 'node_id'.

Bit Quads Algorithm

Design and implement the algorithm to compute the bit-quads incrementally.

Incremental attribute computer

Design and implement the class IncrementalAttributeComputer which implements AttributeComputer. This class provides the interface and algorithm to compute attributes in incremental fashion using a no-recursive algorithm.

Create alias for the CTree and CTNode

The classes CTree and CTNode should have aliases for the most common types like the class Point2D.

The types should have aliases are:

  • unsigned char
  • char
  • unsigned int
  • int
  • unsigned long
  • long
  • float
  • double

Attribute computer

Design and implement the attribute computer which interacts with attribute collection. This function provides the interface to classes which compute attributes for a component tree.

Get started example

The wiki page should have a get started page where the basic functionality of the framework should be shown. In this example, an image should be read (maybe using stb library), its component tree should be read, an attribute like area should be computed and an opening filter should be executed.

Design and Pixel Indexer 2D

Design and implement a set of classes to represent Image 2D Indexing such that if it accesses a position out of domain it returns an invalid value (a constant value, null, exception etc...)

Refactor naming and Physical Structure

This is a refactor issue, the class and method names are pretty bad. This issue tries to make these names shorter and clear in order to make code shorter and easy to understand.

Below there are some suggestions to be discussed: (original name => proposed new name)

MorphologicalTree => CTree

nodes
cmap

MorphologicalTree() => CTree()
MorphologicalTree(parent, sortedIndex, vertices) => CTree(parent, sortedIndices, vertices)
tranverseFromLeavesToRoot(visit) => tranverse(visit)
getNumberOfNodes() => numberOfNodes()
getNodeLevel(id) => nodeLevel(id)
getNodeParent(id) => nodeParent(id)
getNodeChildren(id) => nodeChildren(id)
getNodePixels(id) => nodeVertices(id)
reconstructTreeNode() => reconstructNode()
createNodes(parent, sortedIndex, vertices) => createNodes(parent, sortedIndices, vertices)

MTNode => CTNode

OK excepted by:
vertexIndixes => vertexIndices

MorphologicalTreeBuilderSorter => CTSorter (Extract it from the Builder file)

sort(vertices) => sort(vertices)
countingSort() => countingSort(vertices)

MaxTreeSorter => MaxTreeSorter

sort(vertices) => sort(vertices)
countingSort() => countingSort(vertices)

MorphologicalTreeBuilder => CTBuilder

build(vertices, adj, treeType)
buildWithSorter(vertices, adj, sorter) => build(vertices, adj, sorter)
findRoot(zpar, x)
canonizeTree(vertices, sortedVertices, parent)

AdjacencyRelation => Adjacency

getAdjacentElements(curElem) => neighbours(id)

Image2DAdjacencyRelationByTranslating => AdjacencyByTranslating (remove it from Image2D)

Image2DAdjacencyRelationByTranslating(width, height, t) => AdjacencyByTranslating
createFourConnectedAdjacency(width, height) => create4CAdjacency(width, height)
createEightConnectedAdjacency(width, height) => create8CAdjacency(width, height)

Point2D => OK

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.