# Extracting 3D Objects with a Selection Criterion

The code shows how to extract 3DObjects with a width in the given range.

## C++

```cpp
#include <eVision/Easy3D/Easy3DObject/E3DObjectExtractor.h>
```

```cpp
using namespace eVision;
using namespace eVision::Easy3D;
// EZmap constructor
EZMap8 zMap;

// Extractor constructor
E3DObjectExtractor extractor;

// Setting a selection criterion
extractor.SetWidthRange(EFloatRange(10, 500));

// Extracts the objects from the EZMap
int regionNB = extractor.Extract(zMap);

// Retrieve the extracted objects
std::vector<E3DObject> objects = extractor.GetObjects();
```

## C#

```cs
using eVision;
using eVision.Easy3D;
```

```cs
// EZmap constructor
EZMap8 zMap = new EZMap8();

// Extractor constructor
E3DObjectExtractor extractor = new E3DObjectExtractor();

// Setting a selection criterion
extractor.WidthRange = new EFloatRange(10, 500);

// Extracts the objects from the EZMap
int regionNB = extractor.Extract(zMap);

// Retrieve the extracted objects
E3DObject[] objects = extractor.Objects;
```

## Python

```py
import eVision
from eVision import Easy3D
# EZmap constructor
zmap = Easy3D.EZMap8()

# Extractor constructor
extractor = Easy3D.E3DObjectExtractor()

# Setting a selection criterion
extractor.WidthRange = eVision.EFloatRange(10, 500)

# Extracts the objects from the EZMap
regionNB = extractor.Extract(zmap)

# Retrieve the extracted objects
objects = extractor.Objects
```
