Skip to content
Browse files

Update RawImageDatasetResource to point to new ImageDatasets path in …

…Panda
  • Loading branch information...
1 parent 8103290 commit 4f0e4fc09fbb19b3430d916dc9b8e8b402c69fad Erik committed Jul 26, 2011
View
7 Gemfile
@@ -0,0 +1,7 @@
+source "http://rubygems.org"
+
+# Specify your gem's dependencies in metamri.gemspec
+gemspec
+
+gem 'activeresource', '~>3.0', :require => 'active_resource'
+gem 'hirb', '~>0.4'
View
43 Gemfile.lock
@@ -0,0 +1,43 @@
+PATH
+ remote: .
+ specs:
+ metamri (0.2.5)
+ activeresource (~> 3.0)
+ dicom (~> 0.8)
+ metamri
+ sqlite3 (~> 1.3.3)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ activemodel (3.0.9)
+ activesupport (= 3.0.9)
+ builder (~> 2.1.2)
+ i18n (~> 0.5.0)
+ activeresource (3.0.9)
+ activemodel (= 3.0.9)
+ activesupport (= 3.0.9)
+ activesupport (3.0.9)
+ builder (2.1.2)
+ dicom (0.9.1)
+ diff-lcs (1.1.2)
+ hirb (0.4.5)
+ i18n (0.5.0)
+ rspec (2.6.0)
+ rspec-core (~> 2.6.0)
+ rspec-expectations (~> 2.6.0)
+ rspec-mocks (~> 2.6.0)
+ rspec-core (2.6.4)
+ rspec-expectations (2.6.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.6.0)
+ sqlite3 (1.3.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ activeresource (~> 3.0)
+ hirb (~> 0.4)
+ metamri!
+ rspec (~> 2.5)
View
13 Rakefile
@@ -1,6 +1,6 @@
require 'rubygems'
require 'rake'
-require 'rake/rdoctask'
+require 'rdoc/task'
require 'rake/testtask'
begin
@@ -11,11 +11,12 @@ begin
gemspec.description = "Extraction of MRI metadata and insertion into compatible sqlite3 databases."
gemspec.email = "kk4@medicine.wisc.edu"
gemspec.homepage = "http://github.com/brainmap/metamri"
- gemspec.authors = ["Kristopher J. Kosmatka"]
- gemspec.add_dependency('sqlite3-ruby')
- gemspec.add_dependency('dicom')
- # gemspec.add_dependency('rmagick')
- gemspec.add_development_dependency('rspec')
+ gemspec.authors = ["Kristopher J. Kosmatka", "Erik Kastman"]
+ gemspec.add_dependency('sqlite3', '~>1.3.3')
+ gemspec.add_dependency('dicom', '~>0.8')
+ gemspec.add_dependency('activeresource', '~>3.0')
+ gemspec.add_development_dependency('rspec', '~>2.5')
+
end
Jeweler::GemcutterTasks.new
rescue LoadError
View
1 bin/list_visit
@@ -55,6 +55,7 @@ def run!
list_visit raw_directory, options
rescue StandardError => e
puts e
+ puts e.backtrace if $LOG.level <= Logger::DEBUG
next
end
end
View
13 lib/metamri.rb
@@ -1,10 +1,13 @@
$: << File.dirname(__FILE__)
-# begin
-# require 'rubygems'
-# gem 'activeresource', '<= 2.3.8'
- require 'active_resource'
-# end
+
+begin
+ require 'rubygems'
+ require "bundler/setup"
+ Bundler.require(:default)
+
+rescue LoadError
+end
require 'metamri/core_additions'
View
2 lib/metamri/raw_image_dataset_thumbnail.rb
@@ -1,7 +1,7 @@
require 'tmpdir'
begin
%W{dicom RMagick}.each do |lib|
- require lib
+ require lib unless defined?(lib)
end
rescue LoadError => e
raise LoadError, "Could not load #{e}. Thumbnailing will use slicer instead of ruby-dicom."
View
6 lib/metamri/visit_raw_data_directory.rb
@@ -59,9 +59,9 @@ class VisitRawDataDirectory
# DICOM Study UID (Visit/Study Unique Identifier)
attr_reader :dicom_study_uid
- PREPROCESS_REPOSITORY_DIRECTORY = '/Data/vtrak1/preprocessed/visits'
- # DATAPANDA_SERVER = 'http://localhost:3000'
- DATAPANDA_SERVER = 'http://nelson'
+ PREPROCESS_REPOSITORY_DIRECTORY = '/Data/vtrak1/preprocessed/visits' unless defined?(PREPROCESS_REPOSITORY_DIRECTORY)
+ DATAPANDA_SERVER = 'http://nelson' unless defined?(DATAPANDA_SERVER)
+ # DATAPANDA_SERVER = 'http://localhost:3000' unless defined?(DATAPANDA_SERVER)
# A new Visit instance needs to know the path to its raw data and scan_procedure name. The scan_procedure
View
2 lib/metamri/visit_raw_data_directory_resource.rb
@@ -19,7 +19,7 @@ def to_metamri_visit_raw_data_directory
end
def datasets
- @datasets ||= RawImageDatasetResource.find(:all, :from => "/visits/#{id}/image_datasets.xml" )
+ @datasets ||= RawImageDatasetResource.find(:all, :from => RawImageDatasetResource.collection_path('search[visit_id_eq]' => "#{id}"))
end
# Convert a Resource and its datasets to a VisitRawDataDirectory and
View
34 metamri.gemspec
@@ -8,8 +8,8 @@ Gem::Specification.new do |s|
s.version = "0.2.5"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Kristopher J. Kosmatka"]
- s.date = %q{2011-03-14}
+ s.authors = ["Kristopher J. Kosmatka", "Erik Kastman"]
+ s.date = %q{2011-07-18}
s.description = %q{Extraction of MRI metadata and insertion into compatible sqlite3 databases.}
s.email = %q{kk4@medicine.wisc.edu}
s.executables = ["convert_visit.rb", "import_visit.rb", "import_respiratory_files.rb", "import_study.rb", "list_visit"]
@@ -80,18 +80,30 @@ Gem::Specification.new do |s|
s.specification_version = 3
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- s.add_runtime_dependency(%q<sqlite3-ruby>, [">= 0"])
- s.add_runtime_dependency(%q<dicom>, [">= 0"])
- s.add_development_dependency(%q<rspec>, [">= 0"])
+ s.add_runtime_dependency(%q<metamri>, [">= 0"])
+ s.add_development_dependency(%q<rspec>, ["~> 2.5"])
+ s.add_development_dependency(%q<rspec>, ["~> 2.5"])
+ s.add_runtime_dependency(%q<sqlite3>, ["~> 1.3.3"])
+ s.add_runtime_dependency(%q<dicom>, ["~> 0.8"])
+ s.add_runtime_dependency(%q<activeresource>, ["~> 3.0"])
+ s.add_development_dependency(%q<rspec>, ["~> 2.5"])
else
- s.add_dependency(%q<sqlite3-ruby>, [">= 0"])
- s.add_dependency(%q<dicom>, [">= 0"])
- s.add_dependency(%q<rspec>, [">= 0"])
+ s.add_dependency(%q<metamri>, [">= 0"])
+ s.add_dependency(%q<rspec>, ["~> 2.5"])
+ s.add_dependency(%q<rspec>, ["~> 2.5"])
+ s.add_dependency(%q<sqlite3>, ["~> 1.3.3"])
+ s.add_dependency(%q<dicom>, ["~> 0.8"])
+ s.add_dependency(%q<activeresource>, ["~> 3.0"])
+ s.add_dependency(%q<rspec>, ["~> 2.5"])
end
else
- s.add_dependency(%q<sqlite3-ruby>, [">= 0"])
- s.add_dependency(%q<dicom>, [">= 0"])
- s.add_dependency(%q<rspec>, [">= 0"])
+ s.add_dependency(%q<metamri>, [">= 0"])
+ s.add_dependency(%q<rspec>, ["~> 2.5"])
+ s.add_dependency(%q<rspec>, ["~> 2.5"])
+ s.add_dependency(%q<sqlite3>, ["~> 1.3.3"])
+ s.add_dependency(%q<dicom>, ["~> 0.8"])
+ s.add_dependency(%q<activeresource>, ["~> 3.0"])
+ s.add_dependency(%q<rspec>, ["~> 2.5"])
end
end

0 comments on commit 4f0e4fc

Please sign in to comment.
Something went wrong with that request. Please try again.