Equity (Details) $ / shares in Units, $ in Thousands | Mar. 12, 2019USD ($)$ / sharesshares | Jul. 03, 2018USD ($)$ / sharesshares | Nov. 27, 2017USD ($)$ / sharesshares | Jun. 30, 2019$ / sharesshares | Jun. 30, 2019USD ($)$ / sharesshares | Mar. 12, 2019USD ($)$ / sharesshares | May 30, 2019$ / sharesshares | Dec. 31, 2018shares |
Class of Stock Disclosures [Abstract] | | | | | | | | |
Net proceeds from issuance of convertible preferred stock | $ | | | | | | $ 39,800 | | |
Preferred stock, shares outstanding (in shares) | | | | 0 | 0 | | | 0 |
Expected Stock Price Volatility [Member] | | | | | | | | |
Class of Stock Disclosures [Abstract] | | | | | | | | |
Warrants measurement input | | | | 1.3621 | 1.3621 | | | |
July 2018 Offering [Member] | | | | | | | | |
Class of Stock Disclosures [Abstract] | | | | | | | | |
Issuance of common stock, net (in shares) | | 181,941 | | | | | | |
Public offering price (in dollars per share) | $ / shares | | $ 29.68 | | | | | | |
Gross proceeds from public stock offering | $ | | $ 5,400 | | | | | | |
Net proceeds from public stock offering | $ | | $ 4,600 | | | | | | |
Number of shares issuable on the exercise of warrants (in shares) | | | | 554,322 | 554,322 | | | |
March 2019 Offering [Member] | | | | | | | | |
Class of Stock Disclosures [Abstract] | | | | | | | | |
Issuance of common stock, net (in shares) | 455,178 | | | | | | | |
Public offering price (in dollars per share) | $ / shares | $ 5.25 | | | | | $ 5.25 | | |
Warrants [Member] | Consultant [Member] | | | | | | | | |
Class of Stock Disclosures [Abstract] | | | | | | | | |
Warrants to purchase shares of common stock (in shares) | | | | | | | 100,000 | |
Exercise price of warrants (in dollars per share) | $ / shares | | | | $ 1.93 | $ 1.93 | | $ 3.18 | |
Series F Convertible Preferred Stock [Member] | | | | | | | | |
Class of Stock Disclosures [Abstract] | | | | | | | | |
Gross proceeds from issuance of convertible preferred stock | $ | | | $ 18,000 | | | | | |
Net proceeds from issuance of convertible preferred stock | $ | | | $ 16,200 | | | | | |
Conversion price (in dollars per share) | $ / shares | $ 5.25 | $ 29.68 | $ 63 | | | $ 5.25 | | |
Number of consecutive trading days considered for expiration | | | | 20 days | | | | |
Number of consecutive trading days | | | | 30 days | | | | |
Preferred stock issued (in shares) | | | 18,000 | 535 | 535 | | | 535 |
Number of shares issuable on conversion of preferred stock (in shares) | 191 | | 286,714 | | | 191 | | |
Preferred stock, shares outstanding (in shares) | | | | 535 | 535 | | | 535 |
Aggregate cash placement fee | 8.00% | 9.00% | | | | | | |
Series F Convertible Preferred Stock [Member] | Minimum [Member] | | | | | | | | |
Class of Stock Disclosures [Abstract] | | | | | | | | |
Percentage of volume weighted average price of common stock | | | 300.00% | | | | | |
Trading volume for each trading day | $ | | | $ 200 | | | | | |
Series F Convertible Preferred Stock [Member] | Warrants [Member] | | | | | | | | |
Class of Stock Disclosures [Abstract] | | | | | | | | |
Warrants to purchase shares of common stock (in shares) | | | 573,310 | | | | | |
Warrants issued to the placement agent (in shares) | | | | | 0 | | | |
Series F Convertible Preferred Stock [Member] | Warrant Series 1 [Member] | | | | | | | | |
Class of Stock Disclosures [Abstract] | | | | | | | | |
Warrants to purchase shares of common stock (in shares) | | | 16 | | | | | |
Exercise price of warrants (in dollars per share) | $ / shares | | $ 29.68 | $ 63 | | | | | |
Series F Convertible Preferred Stock [Member] | Warrant Series 2 [Member] | | | | | | | | |
Class of Stock Disclosures [Abstract] | | | | | | | | |
Warrants to purchase shares of common stock (in shares) | | | 16 | | | | | |
Exercise price of warrants (in dollars per share) | $ / shares | | $ 29.68 | $ 63 | | | | | |
Series G Convertible Preferred Stock [Member] | | | | | | | | |
Class of Stock Disclosures [Abstract] | | | | | | | | |
Gross proceeds from issuance of convertible preferred stock | $ | $ 12,400 | | | | | | | |
Net proceeds from issuance of convertible preferred stock | $ | $ 11,000 | | | | | | | |
Conversion price (in dollars per share) | $ / shares | $ 5.25 | | | | | $ 5.25 | | |
Number of consecutive trading days | | | | 30 days | | | | |
Preferred stock issued (in shares) | | | | 550,842 | 550,842 | | | 0 |
Preferred stock, shares outstanding (in shares) | | | | 550,842 | 550,842 | | | 0 |
Beneficial conversion amount | $ | | | | | $ 4,500 | | | |
Beneficial ownership limitation | 4.99% | | | | | | | |
Conversion of preferred stock into common stock (in shares) | | | | 1,359,694 | | | | |
Series G Convertible Preferred Stock [Member] | March 2019 Offering [Member] | | | | | | | | |
Class of Stock Disclosures [Abstract] | | | | | | | | |
Number of shares issuable on conversion of preferred stock (in shares) | 1,910,536 | | | | | 1,910,536 | | |
Series G Convertible Preferred Stock [Member] | Warrant Series 1 [Member] | | | | | | | | |
Class of Stock Disclosures [Abstract] | | | | | | | | |
Exercise price of warrants (in dollars per share) | $ / shares | $ 5.25 | | | | | $ 5.25 | | |
Number of shares issuable on the exercise of warrants (in shares) | 2,365,714 | | | | | 2,365,714 | | |
Series G Convertible Preferred Stock [Member] | Warrant Series 2 [Member] | | | | | | | | |
Class of Stock Disclosures [Abstract] | | | | | | | | |
Exercise price of warrants (in dollars per share) | $ / shares | $ 5.25 | | | | | $ 5.25 | | |
Number of shares issuable on the exercise of warrants (in shares) | 2,365,714 | | | | | 2,365,714 | | |