Commit 0ef1c256 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

[refactoring2016] Moved bob.bio.db.BioDatabase to bob.bio.base

parent ed0617d8
......@@ -3,11 +3,6 @@
# @author: Manuel Guenther <Manuel.Guenther@idiap.ch>
# @date: Tue Oct 2 12:12:39 CEST 2012
import bob.io.base
import bob.bio.db
import os
from .. import utils
class Preprocessor:
......@@ -21,7 +16,7 @@ class Preprocessor:
read_original_data: callable
This function is used to read the original data from file.
It takes three inputs: A :py:class:`bob.bio.db.BioFile` (or one of its derivatives), the original directory (as ``str``) and the original extension (as ``str``).
It takes three inputs: A :py:class:`bob.bio.base.database.BioFile` (or one of its derivatives), the original directory (as ``str``) and the original extension (as ``str``).
kwargs : ``key=value`` pairs
A list of keyword arguments to be written in the :py:meth:`__str__` function.
......
......@@ -6,7 +6,7 @@ import bob.core
logger = bob.core.log.setup("bob.bio.base")
import bob.bio.base
import bob.bio.db
from bob.bio.base.database.file import BioFile
import bob.db.base
import numpy
......@@ -47,7 +47,7 @@ def main(command_line_parameters=None):
preprocessor = bob.bio.base.load_resource(' '.join(args.preprocessor), "preprocessor")
logger.debug("Loading input data from file '%s'%s", args.input_file, " and '%s'" % args.annotation_file if args.annotation_file is not None else "")
data = preprocessor.read_original_data(bob.bio.db.BioFile(1, args.input_file, 2), "", "")
data = preprocessor.read_original_data(BioFile(1, args.input_file, 2), "", "")
annotations = bob.db.base.annotations.read_annotation_file(args.annotation_file, 'named') if args.annotation_file is not None else None
logger.info("Preprocessing data")
......
from bob.bio.base.database import ZTBioDatabase
from bob.bio.base.file import BioFile
from bob.bio.base.database.file import BioFile
from bob.bio.base.test.utils import atnt_database_directory
......
import bob.bio.base
import bob.bio.db
from . import utils
def test_filename():
# load extractor
......@@ -10,7 +7,7 @@ def test_filename():
assert isinstance(preprocessor, bob.bio.base.preprocessor.Filename)
# try to load the original image
assert preprocessor.read_original_data(bob.bio.db.BioFile(1,"2",3), "/any/path", ".any.extension") is None
assert preprocessor.read_original_data(bob.bio.base.database.file.BioFile(1,"2",3), "/any/path", ".any.extension") is None
# try to process
assert preprocessor(None, None) == 1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment