Code Monkey home page Code Monkey logo

mask's Introduction

Obtaining the Source Code
-------------------------
Once you clone this repository, you'll have to also:

git submodule update --init --recursive

to get the code in ITKHelpers/ and ITKHelpers/Helpers/ that this code relies on.

If this command gives you trouble (known problem with mysysgit), instead of

git clone ...

use

git clone --recursive ...

and then no "git submodule update ..." is required.

Building
--------
This repository does not depend on any external libraries. The only caveat is that it depends
on c++0x/11 parts of the c++ language used in the Helpers sub-sub-module. For Linux, this means
it must be built with the flag
gnu++0x. For Windows (Visual Studio 2010), nothing special must be done.

Usage
-----
There are two main files in this repository - Mask.h and MaskOperations.h.

Mask.h contains a Mask class. This class is intended to indicate pixels in an image that are "holes",
and those that are "valid".

A custom file format has been developed to make using existing mask images with this class very easy.
Simply create a file with the extension .mask, and in it place three things:

hole [hole pixel value]
valid [valid pixel value]
maskImageFileName

Consider that you have a mask.png with valid pixels indicated in white and hole pixels indicated in black.
Create a file mymask.mask and in it place

hole 0
valid 255
mask.png

You can then read this file using:

Mask::Pointer mask = Mask::New();
mask->Read("mymask.mask");

and everything is setup appropriately.

In addition to the Mask class, there is a MaskOperations namespace that contains many functions for
performing operations where it is important to consider masked pixels.

mask's People

Contributors

daviddoria avatar panovr avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.